How to Find what HBA is configured on Linux? | Unix Linux Forums | Red Hat

  Go Back    


Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

How to Find what HBA is configured on Linux?

Red Hat


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-11-2011
Tirmazi's Avatar
Tirmazi Tirmazi is offline
Registered User
 
Join Date: Apr 2008
Last Activity: 20 February 2013, 4:03 PM EST
Location: Maryland, USA
Posts: 82
Thanks: 26
Thanked 1 Time in 1 Post
How to Find what HBA is configured on Linux?

Hi

I am working in an environment where there are many redhat physical and virtual machines, mostly Redhat 4. These servers have LUNs attached. The external storage can be EMC, NetApp or Par3.
My question is that when Storage Administrator informs that a new LUN has been presented to a particular Redhat Linux server
(1) how do I know what is the LUN ID.
(2) how do I know what kind of HBA is attached to my server.
(3) how do I scan for new LUNs.

Please guide me I have searching over the net for a while, lastly is there a guide/doc on this, the storage guide from Redhat are not in to much detail.

Thanks and regards
Sponsored Links
    #2  
Old 03-11-2011
mark54g mark54g is offline Forum Advisor  
Registered User
 
Join Date: May 2008
Last Activity: 26 July 2013, 11:43 AM EDT
Location: Northeastern United States
Posts: 918
Thanks: 1
Thanked 61 Times in 58 Posts
The LUN number is a harder one, but here's what you can do:

You can scan for new luns the following way:


Code:
for i in /sys/class/scsi_host/host*
do
echo '- - -' > $i
done

for the type of HBA:


Code:
for i in /sys/class/scsi_host/host*
do
cat $i/model_name; cat $i/model_desc; cat $i/
done

The Following User Says Thank You to mark54g For This Useful Post:
Tirmazi (03-11-2011)
Sponsored Links
    #3  
Old 03-18-2011
titanic4u titanic4u is offline
Registered User
 
Join Date: Nov 2010
Last Activity: 24 July 2013, 5:35 AM EDT
Posts: 9
Thanks: 0
Thanked 3 Times in 3 Posts
Here is little info, hope it helps:
(1) how do I know what is the LUN ID.
-> Depands on the driver which you are using.
for example: if using linux native multipathing then "multipath -ll" will show you the Lun & their details.
If using, third party drivers related to SAN:
for example - Rdac/mpp from IBM then u can use mppUtil -a <storage name>, will show u all the details of Luns...

(3) how do I scan for new LUNs.
again if using linux native multipath then run "rescan-scsi-bus.sh" avaialbe from sg3_utils rpm.
If using third party, for example Rdac of IBM: run "mppBusScan" and it will detect the new LUNs.

Hope it helps....

~Titans~
The Following User Says Thank You to titanic4u For This Useful Post:
Tirmazi (03-21-2011)
    #4  
Old 04-06-2011
sixstrings sixstrings is offline
Registered User
 
Join Date: Jan 2005
Last Activity: 19 May 2014, 1:41 PM EDT
Posts: 64
Thanks: 0
Thanked 5 Times in 5 Posts
Quote:
Originally Posted by mark54g View Post
The LUN number is a harder one, but here's what you can do:

You can scan for new luns the following way:


Code:
for i in /sys/class/scsi_host/host*
do
echo '- - -' > $i
done

actually, you need to add the scan file in this code


Code:
for i in /sys/class/scsi_host/host*
do
echo '- - -' > ${i}/scan
done

Without the scan part, you are echoing the --- into the directory and it will not scan the luns.
The Following User Says Thank You to sixstrings For This Useful Post:
Tirmazi (07-14-2011)
Sponsored Links
    #5  
Old 04-06-2011
mark54g mark54g is offline Forum Advisor  
Registered User
 
Join Date: May 2008
Last Activity: 26 July 2013, 11:43 AM EDT
Location: Northeastern United States
Posts: 918
Thanks: 1
Thanked 61 Times in 58 Posts
sorry, I had meant to add that. I think my copy/pasta didn't work so well
The Following User Says Thank You to mark54g For This Useful Post:
Tirmazi (04-11-2011)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
What are the two ways the hardware clock can be configured under Linux? lemon_06 UNIX for Dummies Questions & Answers 3 10-31-2010 11:01 AM
How to find which raid is configured(without restart) pinga123 UNIX for Dummies Questions & Answers 3 08-30-2010 10:51 AM
solaris 10 u5 what happens if no default route configured borderblaster Solaris 9 08-03-2009 10:47 AM
Configured sftp still requires password unilover UNIX for Advanced & Expert Users 24 03-29-2008 09:41 AM
LDAP not getting configured!!! mridula Slackware 1 11-28-2005 05:27 AM



All times are GMT -4. The time now is 01:19 PM.