First you need to resize the lun on the iscsi server, then use the following script:
SR_NAME=$1
#Get SR UUID
SR2GROW=$(xe sr-list params=uuid name-label=$SR_NAME | awk '{ print $NF }')
# find devices to resize
DEV2GROW=$(pvscan | grep $SR2GROW | awk '{ print $2 }')
# scan for resized devices
iscsiadm -m node -R
# do the resize
for dev in $DEV2GROW ; do
pvresize $dev
done
# tell xenapi to look for the new LVM size
xe sr-scan uuid=${SR2GROW}
No comments:
Post a Comment