第 6 章 Managing multipathed volumes
You can manage multipath volumes by using the multipath, dmsetup, and multipathd commands, which are provided by DM Multipath to resize devices, move file systems, and administer the multipathd daemon.
6.1. Resizing an online multipath device 复制链接链接已复制到粘贴板!
Resize an online multipath device and its filesystem using the multipathd and resize2fs commands. This allows you to expand storage capacity without downtime, ensuring applications remain available while scaling to meet growing data needs.
Procedure
- Resize your physical device.
Find the paths to the logical unit number (LUN):
# multipath -lResize your paths. For SCSI devices, writing a 1 to the
rescanfile for the device causes the SCSI driver to rescan, as in the following command:# echo 1 > /sys/block/path_device/device/rescanEnsure that you run this command for each of the path devices. For example, if your path devices are
sda,sdb,sde, andsdf, run the following commands:# echo 1 > /sys/block/sda/device/rescan # echo 1 > /sys/block/sdb/device/rescan # echo 1 > /sys/block/sde/device/rescan # echo 1 > /sys/block/sdf/device/rescanResize your multipath device:
# multipathd resize map multipath_deviceResize the file system, assuming no LVM or DOS partitions are used:
# resize2fs /dev/mapper/mpatha