Operating System - Linux
1823967 Members
4103 Online
109667 Solutions
New Discussion юеВ

Scanning for luns presented to Linux box

 
Waqar Razi
Regular Advisor

Scanning for luns presented to Linux box

I am an HPUX admin and in HPUX, we use ioscan command to scan for new LUNs presented to an HPUX system. How can I see the LUNS presented to a Linux box. Lets say, storage admin have presented some luns to linux bix, what are the steps to make them seen in linux (RHEL).
8 REPLIES 8
Ivan Ferreira
Honored Contributor

Re: Scanning for luns presented to Linux box

Please see this thread:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1060267
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
John McNulty_2
Frequent Advisor

Re: Scanning for luns presented to Linux box

What version of Redhat ?
Waqar Razi
Regular Advisor

Re: Scanning for luns presented to Linux box

REd hat enterprise 4
Tony Cicone
Honored Contributor

Re: Scanning for luns presented to Linux box

Attached script is recommended by HP for rescanning scsi bus.
Colin Topliss
Esteemed Contributor

Re: Scanning for luns presented to Linux box

I've found that sometimes you need to reboot the server before you can see the luns. Otherwise you can use the utils with the PSP (if you're brave enough to install it), or try rescanning the bus by (for example):

echo "scsi-qlascan" > /proc/scsi/qla2300/0
/bin/rescan-scsi-bus.sh

You might need to supply params to the rescan-scsi-bus.sh script - might depend on your hardware. You also have to have the rescan script :-)

To scan all channels, targets and LUNs, you could also try:

echo "- - -" > /sys/class/scsi_host/host0/scan

Not sure if this works with FC attached LUNs - I had a weird error on the test system, but our EVA has been behaving strangely over the past few days :-(

Once the LUNs can be seen, then Linux does the rest. You should be able to fdisk them, pvcreate them, or do whatever you want. xpinfo or evainfo (depending on what you have) will show you which devices you now have mapped.
Emil Velez
Honored Contributor

Re: Scanning for luns presented to Linux box


try
# hwinfo

its on suse by default i know of and as another HPUX guy it seems to be somewhat equivilent.

I also use

# lvmdiskscan
Fayez
Trusted Contributor

Re: Scanning for luns presented to Linux box

Hi,

As Colin said, most time you have to restart the server after presenting new luns to the linux.
SJO EGGER
Regular Advisor

Re: Scanning for luns presented to Linux box

echo "- - -" > /sys/class/scsi_host/hostX/scan

this way works really fine and i make the same one in my scripts. make sure you do this for every HBA on your system.

no problem on SLES9/10/11.

roland