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 .. Switch Port: fc-corp-203:22
// fc-corp-203 - switch name // 22 - port number
I assume a certain FCP request makes it possible and wonder if a similar tool is available on a Linux server (Im running CentOS mainly). Is anybody aware of such a tool / utility?
Cheers, Vladimir
Hi Vladimir Check this out: f35> fcp topology show Switches connected on adapter 1a:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 219 Switch WWN: 23:e9:54:7f:ee:e9:19:81 Port Count: 9
Switches connected on adapter 1b:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 155 Switch WWN: 23:e8:54:7f:ee:d9:9b:81 Port Count: 9
Switches connected on adapter 0d:
Switch Name: vmw_brcd2 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:04 Port Count: 32
Switches connected on adapter 0b:
Switch Name: vmw_brcd1 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:1a Port Count: 32
You can also use -v and it will list info on attached devices. You can also specify a port. f35> fcp topology show -v 0d Switches connected on adapter 0d:
Switch Name: vmw_brcd2 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:04 Port Count: 32
Port Port WWPN State Type Attached WWPN Port ID ----------------------------------------------------------------------------------- 0 20:00:00:05:1e:35:27:04 Online F-Port 50:0a:09:81:89:5a:c5:a3 0x010000* 1 20:01:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:86:6f:cd 0x010100 20:13:00:a0:98:3c:3e:4c 0x010101 20:07:00:a0:98:3c:3e:4c 0x010102* 2 20:02:00:05:1e:35:27:04 Online F-Port 21:01:00:e0:8b:bc:cd:c3 0x010200* 3 20:03:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:56:6d:a5 0x010300 20:04:00:a0:98:3c:3e:4c 0x010301* 20:0d:00:a0:98:3c:3e:4c 0x010302 4 20:04:00:05:1e:35:27:04 Offline none - 5 20:05:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:36:71:0c 0x010500 20:11:00:a0:98:3c:3e:4c 0x010501 20:06:00:a0:98:3c:3e:4c 0x010502* 6 20:06:00:05:1e:35:27:04 Online F-Port 21:01:00:1b:32:2f:96:5e 0x010600* 7 20:07:00:05:1e:35:27:04 Offline none - <snip>
FCoE: Switches connected on adapter 1b:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 155 Switch WWN: 23:e8:54:7f:ee:d9:9b:81 Port Count: 9
Port Port WWPN State Type Attached WWPN Port ID ----------------------------------------------------------------------------------- vfc5 20:04:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:79 0x9b0140 vfc6 20:05:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:9b 0x9b0160 vfc17 20:10:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:df 0x9b0000* vfc18 20:11:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:89 0x9b0020* vfc25 20:18:54:7f:ee:d9:9b:bf Online TF-Port 50:0a:09:82:88:36:71:0c 0x9b0240 20:1a:00:a0:98:3c:3e:4c 0x9b0044 20:0a:00:a0:98:3c:3e:4c 0x9b0041* vfc26 20:19:54:7f:ee:d9:9b:bf Online TF-Port 50:0a:09:81:88:86:6f:cd 0x9b0060 20:1b:00:a0:98:3c:3e:4c 0x9b0043 20:0b:00:a0:98:3c:3e:4c 0x9b0061* <snip>
You may need to be in priv set advanced or diag depending on the version of Data ONTAP.
I hope this is what you're looking for.
Share and enjoy!
Peter
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Momonth Sent: Thursday, April 17, 2014 8:02 AM To: toasters@teaparty.net Subject: FCP switch / port info
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 .. Switch Port: fc-corp-203:22
// fc-corp-203 - switch name // 22 - port number
I assume a certain FCP request makes it possible and wonder if a similar tool is available on a Linux server (Im running CentOS mainly). Is anybody aware of such a tool / utility?
Cheers, Vladimir _______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
Hello Vladimir:
What drivers are you using on your Cent OS?
I think you want the Cent OS command and not the switch command. Is that right? If so, and you are using Emmulex, try looking here: http://www-dl.emulex.com/support/linux/820121/linux.pdf
Not that you asked, but if you configured the cDOT LIFs before the fabric was ready, you might try using “admin down” and then “admin up” on the LIFS and then waiting. However, all the switch information below is worth a long look because the Cisco switches can be a little different to work with than the Brocades. I don’t think you specified.
—April
On Apr 17, 2014, at 9:43 AM, Learmonth, Peter Peter.Learmonth@netapp.com wrote:
Hi Vladimir Check this out: f35> fcp topology show Switches connected on adapter 1a:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 219 Switch WWN: 23:e9:54:7f:ee:e9:19:81 Port Count: 9
Switches connected on adapter 1b:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 155 Switch WWN: 23:e8:54:7f:ee:d9:9b:81 Port Count: 9
Switches connected on adapter 0d:
Switch Name: vmw_brcd2 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:04 Port Count: 32
Switches connected on adapter 0b:
Switch Name: vmw_brcd1 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:1a Port Count: 32
You can also use -v and it will list info on attached devices. You can also specify a port. f35> fcp topology show -v 0d Switches connected on adapter 0d:
Switch Name: vmw_brcd2 Switch Vendor: Brocade Communications, Inc. Switch Release: v6.4.1b Switch Domain: 1 Switch WWN: 10:00:00:05:1e:35:27:04 Port Count: 32
Port Port WWPN State Type Attached WWPN Port ID
0 20:00:00:05:1e:35:27:04 Online F-Port 50:0a:09:81:89:5a:c5:a3 0x010000* 1 20:01:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:86:6f:cd 0x010100 20:13:00:a0:98:3c:3e:4c 0x010101 20:07:00:a0:98:3c:3e:4c 0x010102* 2 20:02:00:05:1e:35:27:04 Online F-Port 21:01:00:e0:8b:bc:cd:c3 0x010200* 3 20:03:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:56:6d:a5 0x010300 20:04:00:a0:98:3c:3e:4c 0x010301* 20:0d:00:a0:98:3c:3e:4c 0x010302 4 20:04:00:05:1e:35:27:04 Offline none - 5 20:05:00:05:1e:35:27:04 Online F-Port 50:0a:09:84:88:36:71:0c 0x010500 20:11:00:a0:98:3c:3e:4c 0x010501 20:06:00:a0:98:3c:3e:4c 0x010502* 6 20:06:00:05:1e:35:27:04 Online F-Port 21:01:00:1b:32:2f:96:5e 0x010600* 7 20:07:00:05:1e:35:27:04 Offline none -
<snip>
FCoE: Switches connected on adapter 1b:
Switch Name: vtme-svl-c5548-1 Switch Vendor: Cisco Systems, Inc. Switch Release: 5.2(1)N1(1b) Switch Domain: 155 Switch WWN: 23:e8:54:7f:ee:d9:9b:81 Port Count: 9
Port Port WWPN State Type Attached WWPN Port ID
vfc5 20:04:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:79 0x9b0140 vfc6 20:05:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:9b 0x9b0160 vfc17 20:10:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:df 0x9b0000* vfc18 20:11:54:7f:ee:d9:9b:bf Online TF-Port 21:00:00:c0:dd:1b:ca:89 0x9b0020* vfc25 20:18:54:7f:ee:d9:9b:bf Online TF-Port 50:0a:09:82:88:36:71:0c 0x9b0240 20:1a:00:a0:98:3c:3e:4c 0x9b0044 20:0a:00:a0:98:3c:3e:4c 0x9b0041* vfc26 20:19:54:7f:ee:d9:9b:bf Online TF-Port 50:0a:09:81:88:86:6f:cd 0x9b0060 20:1b:00:a0:98:3c:3e:4c 0x9b0043 20:0b:00:a0:98:3c:3e:4c 0x9b0061*
<snip>
You may need to be in priv set advanced or diag depending on the version of Data ONTAP.
I hope this is what you're looking for.
Share and enjoy!
Peter
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Momonth Sent: Thursday, April 17, 2014 8:02 AM To: toasters@teaparty.net Subject: FCP switch / port info
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 .. Switch Port: fc-corp-203:22
// fc-corp-203 - switch name // 22 - port number
I assume a certain FCP request makes it possible and wonder if a similar tool is available on a Linux server (Im running CentOS mainly). Is anybody aware of such a tool / utility?
Cheers, Vladimir _______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
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
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
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)
Thanks for your help chaps, appreciate it.
I haven't figured out yet how OnTAP works to get switch names .. probably it queries FCNS service somehow. I've tried HBA CLI utilities from both Qlogic and Emulex, none of it exposes what I want, basically they do the same parsing of /sys/* as "systool" does.
My findings so far and I can already make use of it (might be well just Brocade based fabric specific):
// all in HEX below
# cat /sys/class/fc_host/host1/port_id 0x680400
0x68 - Switch ID, must be unique in a fabric 0x04 - port number on the "0x68" switch
# cat /sys/class/fc_host/host1/fabric_name 0x1000000533d316ea
As John pointed out, it's the switch's WWN, again must be unique
So having both "port_id" and "fabric_name" + some sort of SAN inventory, like "switch_name -- WWN", one can identify storage attached server position on SAN fabric. I'd say if you have <= 10 switches to manage, it's doable .. not sure if it's going to work when managing hundreds of switches.
Here is also a document I found, might be useful to take a look - https://community.emc.com/servlet/JiveServlet/previewBody/12212-102-1-46887/...
Cheers, Vladimir
On Wed, Apr 23, 2014 at 12:30 PM, Borzenkov, Andrey andrey.borzenkov@ts.fujitsu.com wrote:
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
jc18@storage-test3:~$ cat /sys/class/fc_host/host0/fabric_name 0x100000051e56bf0a
# cat /sys/class/fc_host/host1/port_id 0x680400
0x68 - Switch ID, must be unique in a fabric 0x04 - port number on the "0x68" switch
No. It is *often* port number but not always. It depends on switch model and settings. Director class switches from Brocade support more than 256 ports so they "borrow" bits from ALPA part (last byte). Also Brocade switches in the past used different encoding of physical port numbers into area ID (second byte).
You can query physical port numbers using FC management services. I am not aware of any ready-to-use utility that does it. If I had task to write one I probably based it on HBAAPI which exports interfaces to do it (of course, vendors at the end are free to not implement them ...)
Let's then put it that way:
The port_id info below is valid for
Brocade6510 (core) / Brocade5100 (edge) switches running Fabric OS v7.0.x
I'll take a look in Qlogic SDK to see what it offers in terms of polling SAN at some point, I'm good to go with I've got so far.
Vladimir
On Mon, May 5, 2014 at 4:37 PM, Borzenkov, Andrey andrey.borzenkov@ts.fujitsu.com wrote:
# cat /sys/class/fc_host/host1/port_id 0x680400
0x68 - Switch ID, must be unique in a fabric 0x04 - port number on the "0x68" switch
No. It is *often* port number but not always. It depends on switch model and settings. Director class switches from Brocade support more than 256 ports so they "borrow" bits from ALPA part (last byte). Also Brocade switches in the past used different encoding of physical port numbers into area ID (second byte).
You can query physical port numbers using FC management services. I am not aware of any ready-to-use utility that does it. If I had task to write one I probably based it on HBAAPI which exports interfaces to do it (of course, vendors at the end are free to not implement them ...)