Shrinking a volume using the CLI
You can reduce the size of a compressed or uncompressed volume by using the command-line interface (CLI).
About this task
Volumes can be reduced in size, if it is necessary. You can make a target or auxiliary volume the same size as the source or master volume when you create FlashCopy® mappings. However, if the volume contains data, do not shrink the size of the disk. The system disables shrinking a volume if the selected volume is performing quick initialization. After the quick initialization completes, you can shrink the volume.
- It is difficult to anticipate how an operating system or file system uses the capacity in a volume. When you shrink a volume, capacity is removed from the end of the disk, whether or not that capacity is in use. Even if a volume has free capacity, do not assume that only unused capacity is removed when you shrink a volume.
- If the volume contains data that is being used, do not attempt under any circumstances to shrink a volume without first backing up your data.
- For performance reasons, some operating systems or file systems use the outer edge of the disk.
You can use the shrinkvdisksize command to shrink the physical capacity that is allocated to the particular volume by the specified amount. You can also shrink the virtual capacity of a thin-provisioned volume without altering the physical capacity that is assigned to the volume.
You cannot shrink the capacity of any volume in a Global Mirror with change volumes relationship or in a HyperSwap® relationship.
- Volumes in HyperSwap relationships or in Global Mirror relationships that are operating in cycling mode.
- Volumes in relationships where a change volume is configured.
- Volumes that have a fully allocated copy.
You must shrink both volumes in a relationship to maintain full operation of the system. Shrink the primary volume by the required capacity, and then shrink the secondary volume.
For more information about the command parameters, see shrinkvdisksize.
Procedure
Complete the following steps to shrink a volume: