For an LU managed by HDLM and whose capacity can be expanded, this subsection describes how to expand the capacity of the LU without stopping the system and how to make HDLM recognize that capacity again. By performing this procedure, you can expand the capacity of a file system without unmounting the file system.
- Notes
Before performing this procedure, change the statuses of all paths to Online. If an error has occurred on a path, you cannot perform this procedure.
Before changing the capacity of an LU, be sure to back up the data.
Before changing the capacity of an LU, verify the following items:
The storage system you are using supports the expansion of the capacity of LUs while they are in use.
The OS you are using supports the expansion of capacity of paths (SCSI devices) while they are in use.
To expand the capacity of an LU, check the specifications of the program used to manage the storage system.
To expand the capacity of a SCSI device, check the specifications of the OS.
The HDLM function used in this procedure expands the capacity of an LU, not that of a partition. To expand the capacity of a file system created in a partition, you will need to unmount the file system.
In the following procedure, the capacity of an XFS file system is expanded from 1 GB to 2 GB. This file system is created in /dev/sddlmaa and mounted on /data, in a Red Hat Enterprise Linux 7 environment.
Check the correspondence between the file system (mount point) whose capacity is to be expanded, and the HDLM device (file).
Check the capacity of the file system.
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sddlmaa 1014M 33M 982M 4% /data :Based on the above, you can confirm that the size of /data is 1 GB.
Check the correspondence between the file system and the HDLM device.
# mount /dev/sddlmaa on /data type xfs (rw,relatime,seclabel,attr2,inode64,noquota) :Based on the above, you can confirm that /dev/sddlmaa is mounted on /data.
Check the correspondence between the HDLM device and the LU information in the program used to manage the storage system.
# /opt/DynamicLinkManager/bin/dlnkmgr view -lu Product : X SerialNumber : Y LUs : 3 iLU HDevName Device PathID Status ZZZZ sddlmaa /dev/sdb 000000 Online /dev/sde 000003 Online /dev/sdh 000006 Online /dev/sdk 000007 Online : : KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = yyyy/mm/dd hh:mm:ssBased on the above, you can confirm that sddlmaa corresponds to the iLU ZZZZ of the storage system whose model ID is X and whose serial number is Y.
In the program used to manage the storage system, expand the capacity of the LU. For details on how to expand an LU, see the manual provided with the storage system.
On the server, expand the capacity of all paths (SCSI devices) of the HDLM device.
Check the correspondence between the HDLM device and the paths (SCSI devices).
# /opt/DynamicLinkManager/bin/dlnkmgr view -lu Product : X SerialNumber : Y LUs : 3 iLU HDevName Device PathID Status ZZZZ sddlmaa /dev/sdb 000000 Online /dev/sde 000003 Online /dev/sdh 000006 Online /dev/sdk 000007 Online : : KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = yyyy/mm/dd hh:mm:ssBased on the above, you can confirm that sddlmaa corresponds to /dev/sdb, /dev/sde, /dev/sdh, and /dev/sdk.
Expand the capacity of all corresponding SCSI devices.
In the following, the capacities of /dev/sdb, /dev/sde, /dev/sdh, and /dev/sdk are expanded.
# echo 1 > /sys/block/sdb/device/rescan # echo 1 > /sys/block/sde/device/rescan # echo 1 > /sys/block/sdh/device/rescan # echo 1 > /sys/block/sdk/device/rescan
On the server, expand the capacity of the HDLM device.
Make sure that the statuses of all paths are Online.
# /opt/DynamicLinkManager/bin/dlnkmgr view -lu Product : X SerialNumber : Y LUs : 3 iLU HDevName Device PathID Status ZZZZ sddlmaa /dev/sdb 000000 Online /dev/sde 000003 Online /dev/sdh 000006 Online /dev/sdk 000007 Online : : KAPL01001-I The HDLM command completed normally. Operation name = view, completion time = yyyy/mm/dd hh:mm:ssBased on the above, you can confirm that the statuses of all sddlmaa paths are Online.
Expand the capacity of the HDLM device.
In the following, the capacity of /dev/sddlmaa is expanded.
# dlmcfgmgr -extenddev /dev/sddlmaa -s KAPL10341-I The HDLM device configurations have been changed. KAPL10302-I /usr/sbin/dlmcfgmgr completed normally.
Expand the capacity of the file system on the server.
Expand the capacity of the file system.
In the following, the capacity of /data is expanded.
# xfs_growfs /data meta-data=/dev/sddlmaa isize=256 agcount=4, agsize=65536 blks = sectsz=512 attr=2, projid32bit=1 = crc=0 finobt=0 data = bsize=4096 blocks=262144, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=0 log =internal bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 data blocks changed from 262144 to 524288Check the capacity of the file system.
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sddlmaa 2.0G 33M 2.0G 2% /data :Based on the above, you can confirm that the size of /data is now 2 GB.