Linux on SAN

Hello everyone.

I was wondering if there is a way to increase the size on the LUN on a SAN and make the Linux kernel understand the changes without restarting?

In the past it has always been rebooted to see the new values but im sure that there is a way now for the lvm to see the Free PE in pvdisplay, but i have not yet to find this.

Ill be grateful if someone here has the answer.

Thanks alot in advanced.
Cheers.

Hi,
Have a look at ext2online's manpage, the name is ext2 but it works for ext3 as well... watch out & make backups though :smiley:
Provided you still have enough free PE in your VG of course.

Hi..

Thanks for your reply..Im sorry for not being clear... but its not just the filesystem that i want to expand. I need to expand the PV since i have increased the size on the LUN, for example.... /dev/sdb is LUN1 on the SAN, originally its size is 100G so is the PV... now i want to increase the size of LUN1 to 200G and i want Linux to see the changes without a reboot. In the past i have rebooted and run pvresize /dev/sdb for LVM to see the changes made to the PV. So my question is.. is there a way to update PV size after changing the size on the LUN without a reboot?

Thanks in advance.

You could try this:

echo "- - -" > /sys/class/scsi_host/host<X>/scan

<X> is the host number.

Hi..

Thanks for your speedy reply ... but that didnt do it. :frowning:

try using google to find the script:

rescan_scsi_bus.sh

use it with the -w -l -c options

as always, please try it in a test environment first.

Hi,

Im sorry again that I wasnt clear... thanks for the tip...I think this script tries to discover new devices on the scsi host adaptor or HBA, i cant see anywhere in the script where it checks for the new sizes of the LUNs it discovers. It looks for new devices and new channels/id. On our system the LUNs are dynamic, so we can add more disks to the array to allocate more storage to the host, but Linux doesnt see the new increased size without rebooting.

Thanks in advanced.

Then I am sorry if It cannot help you. I am not 100% certain, but I believe that rescan script will probe the device again and report the new size.

However, is it not possible to allocate new LUNs and then concat the devices together to new logical volumes, then expand the file system?

I tried running the script again to see if it reports the new size... unfortunately.. it didnt :(.

Yes it is possible to create new LUNs and vgextend the existing VG, without rebooting. But the risk is that we might end up with 128 LUNs and the SAN I/O will definitely suffer, or maybe im wrong?