The following procedure details how to dynamically expand storage capacity when a SAN LUN managed by Veritas Dynamic Multi-Pathing (DMP) and Veritas Volume Manager (VxVM) is grown at the storage array level.
On Linux platforms running Veritas Volume Manager (VxVM), the storage expansion can be detected by the operating system and consumed by the VxVM volume and Veritas File System (VxFS) without taking filesystems offline or disrupting active application I/O.
Note: It is vital that storage expansion occurs at the end of the existing LUN so that existing data and on-disk VxVM metadata (private region) remain intact.
For disks exceeding 2 TB in size, the disk must use the Cross-Platform Data Sharing (CDS) format with GUID Partition Table (GPT). Disks initialized with Master Boot Record (MBR) partitioning cannot be resized beyond 2 TB.
If the disk being resized contains the only valid configuration copy for the disk group, VxVM requires the force flag (-f) when executing vxdisk resize. In a Cluster Volume Manager (CVM) environment, the vxdisk resize and vxresize operations must be executed on the CVM Master node.
Support illustrates the dynamic LUN and volume expansion procedure as follows:
Steps:
1 .] The LUN is expanded at the storage array level.
2.] The OS SCSI layer rescans the underlying device paths to detect the new physical LUN capacity.
3.] DMP detects the new disk geometry and path sizes using "vxdisk scandisks".
4.] The VxVM disk header and public region boundaries are updated using "vxdisk resize".
5.] The VxVM volume and VxFS filesystem are grown online concurrently using "vxresize".
Example:
EMC storage will be used to illustrate the dynamic expansion process:
Disk Group: datadg
Volume Name: vol_data
Mount Point: /data (VxFS)
DMP Node / Device: emc0_0262 (OS subpaths: sdam, sdan, sdao, sdap)
Initial Size: 100 GB
Target Size: 200 GB
1.] Check the baseline status of the mounted filesystem and volume before storage expansion:
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/datadg/vol_data 100G 45G 55G 45% /data
v vol_data - ENABLED ACTIVE 209715200 SELECT - fsgen
pl vol_data-01 vol_data ENABLED ACTIVE 209715200 CONCAT - RW
sd emc0_0262-01 vol_data-01 emc0_0262 0 209715200 0 - ENA
2.] Check the current disk size and identify all underlying OS device paths for the DMP node:
DEVICE SIZE(MB) PHYS_SIZE(MB) GROUP
emc0_0262 102400 102400 datadg
sdam ENABLED(A) - c1 EMC emc0 -
sdan ENABLED(A) - c1 EMC emc0 -
sdao ENABLED(A) - c2 EMC emc0 -
sdap ENABLED(A) - c2 EMC emc0 -
3.] The SAN storage administrator expands LUN "0262" at the storage array level from 100 GB to 200 GB.
4.] The Linux OS is updated by triggering a SCSI rescan across all underlying device handles:
#! /bin/ksh
for dev in sdam sdan sdao sdap
do
echo 1 > /sys/block/${dev}/device/rescan
done
Alternatively, the 3rd party script can be executed:
5.] Verify that the Linux OS kernel has updated the physical capacity for all paths:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdam 66:96 0 200G 0 disk
sdan 66:112 0 200G 0 disk
sdao 66:128 0 200G 0 disk
sdap 66:144 0 200G 0 disk
6.] Refresh the DMP and VxVM incore database to discover the updated path geometry:
DEVICE SIZE(MB) PHYS_SIZE(MB) GROUP
emc0_0262 102400 204800 datadg
Note: Notice that PHYS_SIZE(MB) now reflects the new 200 GB (204800 MB) capacity, while SIZE(MB) still reports the original 100 GB allocated to the VxVM disk group public region.
7.] Execute "vxdisk resize" to update the private region and expand the public region on the disk:
Note: In a CVM cluster environment, this command must be executed on the CVM Master node. Verify the master using vxdctl -c mode.
If the disk contains the sole configuration copy for the disk group, include the -f option:
8.] Verify that the usable size has been updated in the disk group:
DEVICE SIZE(MB) PHYS_SIZE(MB) GROUP
emc0_0262 204800 204800 datadg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dm emc0_0262 emc0_0262 - 419426304 - - - -
9.] Execute "vxresize" to grow both the VxVM volume and the VxFS filesystem online:
To extend by an additional 100 GB:
Alternatively, the new target total size can be specified:
10.] Confirm the new filesystem size and volume layout:
Filesystem Size Used Avail Use% Mounted on
/dev/vx/dsk/datadg/vol_data 200G 45G 155G 23% /data
v vol_data - ENABLED ACTIVE 419430400 SELECT - fsgen
pl vol_data-01 vol_data ENABLED ACTIVE 419430400 CONCAT - RW
sd emc0_0262-01 vol_data-01 emc0_0262 0 419430400 0 - ENA
Provides a complete step-by-step procedure to dynamically detect SAN LUN capacity expansion on Linux, update Veritas Dynamic Multi-Pathing (DMP) and Veritas Volume Manager (VxVM), and resize the underlying VxVM volume and Veritas File System (VxFS) online using vxdisk resize and vxresize without requiring application downtime.
Feedback submitted!