The shrinkvdisksize command reduces the size of a VDisk by the specified capacity.
>>- svctask -- -- shrinkvdisksize -- --+- -size disk_size -+---> '- -rsize disk_size-' >-- --+--------------+--+-------------------+-- ----------------> '- -copy-- id -' '- -unit --+- b --+-' +- kb -+ +- mb -+ +- gb -+ +- tb -+ '- pb -' >--+- vdisk_name -+-------------------------------------------->< '- vdisk_id ---'
The shrinkvdisksize command reduces the capacity that is allocated to the particular virtual disk by the amount that you specify. You cannot shrink the real size of a space-efficient volume below its used size. All capacities, including changes, must be in multiples of 512 bytes. An entire extent is reserved even if it is only partially used. The default capacity units are MB.
The command can be used to shrink the physical capacity that is allocated to a particular VDisk by the specified amount. The command can also be used to shrink the virtual capacity of a space-efficient VDisk without altering the physical capacity assigned to the VDisk. To change the capacity of a non-space-efficient disk, use the -size parameter. To change the real capacity of a space-efficient disk, use the -rsize parameter. To change the virtual capacity of a space-efficient disk, use the -size parameter.
VDisks can be reduced in size, if required.
When the virtual size of a space-efficient VDisk is changed, the warning threshold is automatically scaled to match. The new threshold is stored as a percentage.
To run the shrinkvdisksize command on a mirrored VDisk, all copies of the VDisk must be synchronized.
The cluster 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 assume that it is unused space that is removed.
An invocation example
To decrease the capacity of vdisk1 by 2 KB, enter:
svctask shrinkvdisksize -size 2048 -unit b vdisk1
The resulting output
No feedback
An invocation example
To decrease the capacity of vdisk2 by 100 MB, enter:
svctask shrinkvdisksize -size 100 -unit mb vdisk2
The resulting output
No feedback
An invocation example
To decrease the real capacity of space-efficient VDisk vdisk3 by 100 MB without changing its virtual capacity, enter:
svctask shrinkvdisksize -rsize 100 -unit mb vdisk3
The resulting output
No feedback
An invocation example
To decrease the real capacity of space-efficient VDisk copy ID 1 of mirrored VDisk vdisk4 by 100 MB, enter:
svctask shrinkvdisksize -rsize 100 -unit mb -copy 1 vdisk4
The resulting output
No feedback
An invocation example
To decrease the virtual capacity of space-efficient VDisk vdisk5 by 1 GB without changing its real capacity, enter:
svctask shrinkvdisksize -size 1 -unit gb vdisk5
The resulting output
No feedback