Shrinking a virtual disk using the CLI

You can reduce the size of a virtual disk (VDisk) using the command-line interface (CLI).

VDisks can be reduced in size, if it is necessary. You can make a target or auxiliary VDisk the same size as the source or master VDisk when you create FlashCopy® mappings, Metro Mirror relationships, or Global Mirror relationships. However, if the VDisk contains data, do not shrink the size of the disk.

Attention:
  1. The SAN Volume Controller arbitrarily reduces the capacity of the VDisk by removing one or more extents from those that are allocated to the VDisk. You cannot control which extents are removed so you cannot guarantee that it is unused space that is removed.
  2. If the VDisk contains data that is being used, do not attempt under any circumstances to shrink a VDisk without first backing up your data.
  3. 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 VDisk by the specified amount. You can also shrink the virtual capacity of a space-efficient VDisk without altering the physical capacity assigned to the VDisk.

For more information about the command parameters, see the IBM® System Storage® SAN Volume Controller Command-Line Interface User's Guide.

Perform the following steps to shrink a VDisk:

  1. Validate that the VDisk is not mapped to any host objects. If the VDisk is mapped, data is displayed.
  2. You can determine the exact capacity of the source or master VDisk. Issue the following command:

    svcinfo lsvdisk -bytes vdiskname

  3. Shrink the VDisk by the required amount. Issue the following command:

    svctask shrinkvdisksize -size capacitytoshrinkby -unit
    unitsforreduction vdiskname/ID

Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.