shrinkvdisksize

You can use the shrinkvdisksize command to shrink a VDisk by a given capacity.

Syntax

Read syntax diagramSkip visual syntax diagram>>- svctask -- -- shrinkvdisksize -- -- -size -- disk_size ----->

>-- --+- vdisk_name -+-----------------------------------------><
      '- vdisk_id ---'

Parameters

-size disk_size
The command line will reduce the size by the specified amount.
vdisk_name | vdisk_id
Specifies the virtual disk name to modify, either by ID or by name.

Description

This command reduces the capacity allocated to the particular virtual disk by the given amount. The default capacity is in MB.

VDisks can be reduced in size should it be required. However, if the VDisk contains data that is being used, under no circumstances should you attempt to shrink a VDisk without first backing up your data. The SAN Volume Controller arbitrarily reduces the capacity of the VDisk by removing a partial, one or more extents from those allocated to the VDisk. You cannot control which extents are removed and so you cannot guarantee that it is unused space that is removed.

Attention: Attention: This feature should only be used to make a target or auxiliary VDisk the same size as the source or master VDisk when creating FlashCopy mappings or Remote Copy relationships. You should also ensure that the target VDisk is not mapped to any hosts prior to performing this operation.
Attention: Attention: If the virtual disk contains data, you should not shrink the disk.
Note:Note: Some operating systems or file systems use what they consider to be the outer edge of the disk for performance reasons. This command is provided to shrink FlashCopy target virtual disks to the same capacity as the source.

Validate that the VDisk is not mapped to any host objects. If the VDisk is mapped, data is displayed. You can determine the exact capacity of the source or master VDisk by issuing the svcinfo lsvdisk -bytes <vdiskname> command. Shrink the VDisk by the required amount by issuing the svctask shrinkvdisksize -size <capacitytoshrinkby> -unit <unitsforreduction> <vdiskname/ID> command.

Possible failures

Examples

An invocation example

svctask shrinkvdisksize -size 2048 -unit b vdisk1