Wednesday, February 22, 2012

Resize a Lun (multipath) Linux

# multipath -ll mpath0

# for i in `multipath -ll mpath0 | grep sd | awk '{print $2}'`; do
> echo $i ; done
1:0:1:0
2:0:1:0
1:0:0:0
2:0:0:0

>>>> to reread the current (storage-based) size parameters of the devices

# for i in `multipath -ll mpath0 | grep sd | awk '{print $3}'`; \
do \
lockdev --rereadpt /dev/$i ;\
done

>>>> You can check with: blockdev –getsz /dev/$i


# multipathd -k"resize multipath mpath0"

# multipath -ll mpath0

# pvresize /dev/mapper/mpath0

# lvresize -L 50G /dev/VolGroup01/san1

# resize2fs /dev/VolGroup01/san1

# df


Ref:
http://blogs.utexas.edu/hcoyote/2009/11/12/resizing-a-linu-multipathd-san-lun/
http://run.tournament.org.il/hot-resize-multipath-disk-linux/
http://zenhat.org/2011/04/02/how-to-extend-lun-without-reboot-redhat/

No comments:

Post a Comment