Online Resizing of the Lun

When we do online resizing of the lun. We have to resize the volume at the SAN side then have to refresh the multipath at the server side to get the size of the volume detected.

Resizing of the LUN at SAN side:


1. Open the SAN cosole -> Click on the SAN volume that you want to resize.
2. On the left hand side of the console -> Click on the Modify volume settings -> Select the Tab Space -> Enter the size and click on apply.


Server Side:

1.Use the following command to find the paths to the LUN:

#multipath -ll

2.Resize your paths. For SCSI devices, writing a 1 to the rescan file for the device causes the SCSI driver to rescan, as in the following command:

#echo 1 > /sys/block/device_name/device/rescan

3.Resize your multipath device by running the multipathd resize command:

# multipathd -k'resize map mpath0'

4. If it is in lvm,

a)Do the pvresize, pvscan, vgresize, vgscan, lvresize.
b)Run resize2fs command to effect the changes on the filesystem online.

Other ways to do resize is given in below links:

http://www.mail-archive.com/rhelv5-list@redhat.com/msg04850.html

http://ramblings.narrabilis.com/wp/online-resize/

# for varTmp in `multipath -ll san4_Data | grep sd | awk '{print $2}'`; do echo 1 > sys/class/scsi_device/$varTmp/device/rescan ;done ; unset varTmp

Or

# for varTmp in `multipath -ll san4_Data | grep sd | awk '{print $3}'`; do blockdev --rereadpt /dev/$varTmp ;done ; unset varTmp

Where san4_Data is Lun Name

Comments

Popular posts from this blog

configure Netbackup email notification on Unix