For a living I mainly work with HP-UX. So when it comes to Linux tasks, it's just different. I have been playing in my lab with multipathing and dynamic lun expansion (DLE) on a 3PAR array. So here is my short concise way to grow a lun, have multipathing see it, and then resize a volume group.
Here's the skinny:
1. Have you or your san administrator grow the LUN.
2. Next run multipath -l or -ll to get the disks associated with the multipath lun.
In the output you see that for the map called OELTST01_D the associated disks are sba, sdb, sdc, and sdd.[ccampbel@oeltst01 ~]$ sudo multipath -ll
OELTST01_D (350002ac9a3d41340) dm-2 3PARdata,VV
size=5.0G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:1:0 sdb 8:16 active ready running
|- 1:0:1:0 sdd 8:48 active ready running
|- 0:0:0:0 sda 8:0 active ready running
`- 1:0:0:0 sdc 8:32 active ready running
3. Do a scan of the block devices in order to resize them. This part seems superfluous IMO. In my testing I thought "hey, these are all the same disk, so I will just rescan one of them", and I was wrong. You need to rescan all the disks. So you need to run the following command in order to rescan each disk:
echo 1 > /sys/block/sdX
/device/rescan
4. Now that you have finished the rescans, you can now resize the multipath device. Simply run the following command for your device. In this case it is OELTST01_D.
multipathd -k"resize map
OELTST01_D"
Now if you run multipath -l, you should see the new size.
5. If you are using LVM, all you need to do is use pvresize to resize the volume group.
Comments
Post a Comment