When you add or remove volumes from a storage group, all
the volumes in that storage group must be of the same type.
About this task
Also, when a storage group is used to extend a data set,
the volumes must have the same device type as the volumes that were
used when the data set was defined
The changes that you make
to the volume list by using the ALTER STOGROUP statement have no effect
on existing storage. Changes take effect when new objects are defined
or when the REORG, RECOVER, or LOAD REPLACE utilities are used on
those objects. For example, if you use the ALTER STOGROUP statement
to remove volume 22222 from storage group DSN8G910, the Db2 data on that volume remains intact. However,
when a new table space is defined by using DSN8G910, volume 22222
is not available for space allocation.
Procedure
To add a new volume to a storage group:
- Use the SYSIBM.SYSTABLEPART catalog table to determine
which table spaces are associated with the storage group.
For example,
the following query indicates which table spaces use storage group
DSN8G910:
SELECT TSNAME, DBNAME
FROM SYSIBM.SYSTABLEPART
WHERE STORNAME ='DSN8G910' AND STORTYPE = 'I';
- Make an image copy of each table space.
For
example, issue the statement COPY TABLESPACE dbname.tsname DEVT
SYSDA.
- Ensure that the table space is not being updated in such
a way that the data set might need to be extended.
For
example, you can stop the table space with the Db2 command STOP DATABASE (dbname)
SPACENAM (tsname).
- Use the ALTER STOGROUP statement to remove the volume that
is associated with the old storage group and to add the new volume:
ALTER STOGROUP DSN8G910
REMOVE VOLUMES (VOL1)
ADD VOLUMES (VOL2);
Restriction: When a new volume is added, or when
a storage group is used to extend a data set, the volumes must have
the same device type as the volumes that were used when the data set
was defined.
- Start the table space with utility-only processing by using
the Db2 command START
DATABASE (dbname) SPACENAM (tsname) ACCESS(UT).
-
Use the RECOVER utility or the REORG utility to move the data
in each table space.
For example, issue RECOVER dbname.tsname.
- Start the table space with the Db2 command START DATABASE (dbname)
SPACENAM (tsname).