Shrinking volumes

You can reduce the capacity of a compressed or uncompressed volume by using the management GUI or the command-line interface (CLI).

Volumes can be reduced in capacity, if it is necessary. You can make a target or auxiliary volume the same capacity as the source or master volume when you create FlashCopy® mappings, Metro Mirror relationships, or Global Mirror relationships. 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.

Attention:
  1. 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 available capacity, do not assume that only unused capacity is removed when you shrink a volume.
  2. 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.
  3. For performance reasons, some operating systems or file systems use the outer edge of the disk.
  4. Do not shrink Global Mirror volumes or Global Mirror change volumes or run recovervdisk.

You can use the shrinkvdisksize command or the management to shrink the usable capacity that is provisioned to the particular volume by the specified amount. You can also shrink the provisioned capacity of a thin-provisioned volume without altering the usable 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.

You can shrink the capacity of volumes in Metro Mirror and Global Mirror relationships that are in consistent_synchronized state. You cannot shrink the following types of volumes:
  • Volumes in HyperSwap relationships or in Global Mirror relationships that are operating in cycling mode.
  • Volumes in relationships where a change volume is configured.
  • Mirrored volumes that have at least one standard-provisioned volume copy.
  • A target volume in FlashCopy mappings cannot be shrunk. However, you can shrink a source volume, if the starting capacity of the FlashCopy mapping is not greater than the proposed capacity for the source volume. The management GUI filters target volumes that can be shrunk and disables the shrink action for those volumes that do not meet the criteria. If you are using the command-line interface, use the lsfcmap command to display the starting capacity (start_capacity parameter) of the FlashCopy mapping. This parameter indicates the capacity that was used the last time the FlashCopy operation was completed.

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.

Using the management GUI

To shrink a volume by using the management GUI, complete the following steps:
  1. Click Volumes > Volumes.
  2. On the Volumes page, right-click the volume and select Modify Volume Capacity.
  3. On the Modify Volume Capacity page, verify the volume that is being changed. The management GUI identifies volumes that are apart of a FlashCopy mapping. If you changing the capacity of one volume that is used in a FlashCopy mapping, the other volume in the mapping must also be changed so the capacity is the same on both volumes. If capacity does not match for volumes that are used in a FlashCopy mapping, the FlashCopy mapping cannot be started. The FlashCopy mapping displays with Capacity Mismatch value for Volume Capacity column on the FlashCopy mappings page. For more information, see Changing volume capacity for FlashCopy mappings.
  4. Select Shrink to decrease the capacity of the selected volume.
  5. Select the amount of capacity and the unit of capacity to decrease the volume capacity by.
  6. Click Shrink.

Using the command-line interface

To shrink a volume, complete the following steps:
  1. Validate that the volume is not mapped to any host objects. If the volume is mapped, data is displayed.
  2. You can determine the exact capacity of the source or master volume. Issue the following command:
    lsvdisk -bytes vdisk_name
  3. Shrink the volume by the required amount. Enter the following command, where size_change indicates the size reduction for the volume in the specified units and vdisk_name is the volume that you are shrinking.
    shrinkvdisksize -size size_change -unit
    b | kb | mb | gb | tb | pb vdisk_name