[olug] Resizing luns presented from external storage while using multipath

jay swackhamer reboottheuser at gmail.com
Fri Nov 4 16:29:44 UTC 2011


This script takes the dm- name as an argument and does the underlying
commands to resize a lun after it's been resized on the storage array.


i.e.
resize_lun.sh dm-128


#resize_lun.sh
LUN=$1

MPATH=`multipath -ll | grep ${LUN} | awk ' { print $1 } '`

for i in `multipath -ll ${MPATH} | grep sd | awk '{print $3}'`
do
    blockdev --rereadpt /dev/${i}
done

multipathd -k"resize map ${MPATH}"

pvresize /dev/${LUN}



More information about the OLUG mailing list