And to get port HBA is connected to:
~ # cat /sys/class/fc_host/host3/port_id 0x010800
Although it still needs knowledge of exact switch model, in general you cannot map it 1-to-1 to physical port numbers. But it provides useful cross-reference with information from switches :)
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of John Constable Sent: Wednesday, April 23, 2014 1:23 PM To: Momonth Cc: toasters@teaparty.net Subject: Re: FCP switch / port info
Hey there,
There are tools from the manufacturers (Qlogic or Emulex, for example), but as I can never guarantee to find them installed, I've ended up using the kernel;
#alias for getting the HBA info from a system alias Get-HBA-Info='systool -c fc_host -A port_name' #alias for firmware versiosn on FC cards alias Get-HBA-Firmware='systool -c scsi_host -A fw_version' #alias for driver version on FC cards alias Get-HBA-Driver='systool -c scsi_host -A driver_version'
The systool command is a way to 'easily' get the tuples from the /sys filesystem;
jc18@storage-test3:~$ cat /sys/class/fc_host/host0/fabric_name 0x100000051e56bf0a
However, as you can see, it needs some interpretation, as the above is the switch WWNN from the switchshow output on one of our brocade switches;
fc_ge02a_grn:admin> switchshow switchName: fc_ge02a_grn switchType: 71.2 ... switchWwn: 10:00:00:05:1e:56:bf:0a
Hope that's of some use..
John
On 18 Apr 10:49, Momonth wrote:
Sorry, if I was not clear enough in my first message:
I'm after a Linux tool that deliveries the same thing as OnTAP's "fcp show adapters -v" does, ie tells me info about Linux server attached to SAN.
On Thu, Apr 17, 2014 at 5:01 PM, Momonth momonth@gmail.com wrote:
Hi All,
With OnTAP 8.x (afaik), it became possible to see what FC switch name / port number a filer is connected to on SAN:
filer> fcp show adapters -v
Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
-- John Constable Informatics Systems Group Tel: +44 1223 496924 Wellcome Trust Sanger Institute QOTD: “An expert is a person who has made all the mistakes that can be made in a very narrow field.” - Niels Bohr (1885-1962)