shrinkvdisksize

The shrinkvdisksize command reduces the size of a VDisk by the specified capacity.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- svctask -- -- shrinkvdisksize -- --+- -size  disk_size -+--->
                                       '- -rsize  disk_size-'   

>-- --+--------------+--+-------------------+-- ---------------->
      '- -copy-- id -'  '- -unit --+- b --+-'      
                                   +- kb -+        
                                   +- mb -+        
                                   +- gb -+        
                                   +- tb -+        
                                   '- pb -'        

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

Parameters

-size disk_size
(Required) Specifies the size reduction for the designated virtual disk. The -size parameter cannot be used with the -rsize parameter. You must specify either -size or -rsize.
-rsize disk_size
(Optional) Reduces the real size of a space-efficient VDisk by the specified amount. Specify the disk_size value using an integer. Specify the units for a disk_size integer using the -unit parameter; the default is MB. The -rsize value can be greater than, equal to, or less than the size of the VDisk. You must specify either the -size parameter or the -rsize parameter.
-copy id
(Optional) Specifies the copy to change the real capacity for. You must also specify the -rsize parameter. If the -copy parameter is not specified, all copies of the VDisk are reduced. This parameter is required if the VDisk is mirrored and only one copy is space-efficient.
-unit b | kb | mb | gb | tb | pb
(Optional) Specifies the data units to be used in conjunction with the value that is specified by the -size parameter.
vdisk_name | vdisk_id
(Required) Specifies the virtual disk that you want to modify, either by ID or by name.

Description

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.

Attention: If the VDisk contains data that is being used, do not shrink the VDisk without backing up the data first.

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.

Attention:
  1. If the virtual disk contains data, do not shrink the disk.
  2. Some operating systems or file systems use what they consider to be the outer edge of the disk for performance reasons. This command can shrink FlashCopy® target virtual disks to the same capacity as the source.
  3. Before you shrink a VDisk, 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 disk_size -unit b | kb | mb | gb | tb | pb vdisk_name | vdisk_id command.

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
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2003, 2009. All Rights Reserved.