Sharing Knowledge | System Admin Articles

Resizing Online Multipath Disk in Linux




Here is the steps to Resize an Online Multipath Disk which is using Linux native device mapper as multipath solution.


1. Resize your physical disk in SAN. SAN Admins will do this. 
2. Use the following command to find the paths to the LUN:
# multipath -l
3. Now, Resize your paths. For SCSI devices, use the following command:
# echo 1 > /sys/block/<device_name>/device/rescan
4. Resize your multipath device by running the multipathd resize command:
# multipathd -k'resize map mpath0'
5. Resize the  File System (Assuming LVM is NOT used)
# resize2fs /dev/mapper/mpath0
If LVM is used, you need to do the following:
#pvscan
Check your Disk Changes detected under LVM:
#pvs or pvdisplay 
#vgscan
To check the VG Size is Increased:
#vgs or vgdisplay
Now Extend the LV: 
#lvextend -L +<SIZE_TO_BE_INCREASED>G <LV_NAME>
Finally Extend the File System
#resize2fs <LV_NAME>


Thats all. You are done 


Labels: Linux, Multipathing

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

1 Comments for "Resizing Online Multipath Disk in Linux"

Run pvresize command to increase the extended space

EX: pvresize /dev/sda

What do you think about this Article? Add your Opinion..!

Back To Top