Replace the storage paths in a storage group with new storage
paths.
Procedure
To replace the existing storage paths in a storage
group:
- Add the new storage paths to an existing storage group.
ALTER STOGROUP sg_default ADD '/hdd/path3', '/hdd/path4'
- Drop the old storage paths.
ALTER STOGROUP sg_default DROP '/hdd/path1', '/hdd/path2'
Note: All storage groups must have at least one path and that last
path cannot be dropped.
This marks the dropped
storage paths as DROP PENDING.
- Determine the affected non-temporary table spaces.
SELECT TBSP_NAME
FROM table (MON_GET_TABLESPACE(' ', -2))
WHERE TBSP_USING_AUTO_STORAGE = 1
AND TBSP_CONTENT_TYPE IN ('ANY','LARGE')
AND STORAGE_GROUP_NAME = 'sg_default'
ORDER BY TBSP_ID
- Perform the following statement for each of the affected
non-temporary table spaces returned.
ALTER TABLESPACE tablespace-name REBALANCE
- If there are any temporary table spaces defined on the
dropped storage paths, you must create the new temporary table spaces
first before dropping the old ones.
SELECT TBSP_NAME
FROM table (MON_GET_TABLESPACE(' ', -2))
WHERE TBSP_USING_AUTO_STORAGE = 1
AND TBSP_CONTENT_TYPE IN ('USRTEMP','SYSTEMP')
AND STORAGE_GROUP_NAME = 'sg_default'
ORDER BY TBSP_ID