System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

LUN Adding in RHEL 5.3 without Reboot

 
Md. Minhaz Khan
Super Advisor

LUN Adding in RHEL 5.3 without Reboot

Dear Experts,

I am using "rescan-scsi-bus.sh" script to assign LUN without reboot our LINUX server (RHEL 4.5). But the problem is, this script works fine upto RHEL 4.5 but when i want to visible LUN's without reboot, assigned from our EMC SAN using this script it is not working.

Please can any one help me with this issue??

**Note: I have attached "rescan-scsi-bus.sh" script with this thread.

Thanks
Minhaz
5 REPLIES
Md. Minhaz Khan
Super Advisor

Re: LUN Adding in RHEL 5.3 without Reboot

Dear Experts,

Any help ??

Thanks
Minhaz
Matti_Kurkela
Honored Contributor

Re: LUN Adding in RHEL 5.3 without Reboot

Your script will trigger a FibreChannel LIP (Loop Initialization Primitive, essentially a FC link reset), then immediately tries to scan the FC adapter for disks:
-----
echo 1 > /sys/class/fc_host/host$host/issue_lip 2> /dev/null;
echo "- - -" > /sys/class/scsi_host/host$host/scan 2> /dev/null;
-----

After the LIP is triggered, it would be best to wait a while for the HBA to complete the LIP operation before trying to scan for disks. If you try to scan before the LIP is completed, you'll find no new disks at all.

Perhaps your older systems have been slower just enough that the HBA could successfully complete the LIP operation before the scanning step starts?

Try adding a small delay between the two lines I listed above. For example, "sleep 2" might be enough.

MK
MK
AnthonySN
Respected Contributor
Tim Nelson
Honored Contributor

Re: LUN Adding in RHEL 5.3 without Reboot

another option.

most HBA vendors supply command line tools for fc info and bus rescanning.

e.g. qlogic supplies Linux-Tools
hp supplies an fc rescan utility as well.

Md. Minhaz Khan
Super Advisor

Re: LUN Adding in RHEL 5.3 without Reboot

Dear MK,

Thanks for your advise. Its now working. I have set sleep 10 between two lines.

BR

Minhaz