Dynamic LUN expansion

Many modern disk arrays allow existing LUNs to be resized. Veritas Volume Manager (VxVM) supports dynamic LUN expansion, by providing a facility to update disk headers and other VxVM structures to match a new LUN size. The device must have a SCSI interface that is presented by a smart switch, smart array, or RAID controller.

Resizing should only be performed on LUNs that preserve data. Consult the array documentation to verify that data preservation is supported and has been qualified. The operation also requires that only storage at the end of the LUN is affected. Data at the beginning of the LUN must not be altered. No attempt is made to verify the validity of pre-existing data on the LUN. The operation should be performed on the host where the disk group is imported (or on the master node for a cluster-shared disk group).

VxVM does not support resizing of LUNs that are not part of a disk group. It is not possible to resize LUNs that are in the boot disk group (aliased as bootdg), in a deported disk group, or that are offline, uninitialized, being reinitialized, or in an error state.

VxVM does not support resizing of a disk with the VxVM cdsdisk layout to a size greater than 1 TB if the disk group version is less than 160. VxVM added support for cdsdisk disks greater than 1 TB starting in disk group version 160.

When a disk is resized from the array side, you must also resize the disk from the VxVM side to make VxVM aware of the new size.

Use the following form of the vxdisk command to make VxVM aware of the new size of a LUN that has been resized:

# vxdisk [-f] [-g diskgroup] resize {accessname|medianame} \
  [length=value]

If a disk media name rather than a disk access name is specified, a disk group name is required. Specify a disk group with the -g option or configure a default disk group. If the default disk group is not configured, the above command generates an error message.

Following a resize operation to increase the length that is defined for a device, additional disk space on the device is available for allocation. You can optionally specify the new size by using the length attribute.

Any volumes on the device should only be grown after the LUN itself has first been grown.

Warning:

Do not perform this operation when replacing a physical disk with a disk of a different size as data is not preserved.

Before shrinking a LUN, first shrink any volumes on the LUN or move those volumes off of the LUN. Then, resize the device using vxdisk resize. Finally, resize the LUN itself using the storage array's management utilities. By default, the resize fails if any subdisks would be disabled as a result of their being removed in whole or in part during a shrink operation.

If the device that is being resized has the only valid configuration copy for a disk group, the -f option may be specified to forcibly resize the device. Note the following exception. For disks with the VxVM cdsdisk layout, disks larger than 1 TB in size have a different internal layout than disks smaller than 1 TB. Therefore, resizing a cdsdisk disk from less than 1 TB to greater than 1 TB requires special care if the disk group only has one disk. In this case, you must add a second disk (of any size) to the disk group prior to performing the vxdisk resize command on the original disk. You can remove the second disk from the disk group after the resize operation has completed.

Caution:

Resizing a device that contains the only valid configuration copy for a disk group can result in data loss if a system crash occurs during the resize.

Resizing a virtual disk device is a non-transactional operation outside the control of VxVM. This means that the resize command may have to be re-issued following a system crash. In addition, a system crash may leave the private region on the device in an unusable state. If this occurs, the disk must be reinitialized, reattached to the disk group, and its data resynchronized or recovered from a backup.