How to get an HBA port identifier under linux

Disclaimer: This is yet another ‘let’s write it down in case I need it again’ sort of post. I will try to give some context, but only the bare minimum for it

So you have a SAN storage, and your power machine connects to this subsystem using Emulex cards. You have updated the profile of your lpar with the fibre channel adapter. But how are you going to get the emulex card physical addresses so you can map the drives correctly on the SAN management interface?

Faced with this problem, I tried the brute force approach (go to /sys and try to find something that resembles what I am looking for). Yes, it might be ugly, but in this case, it worked just fine 🙂

[root@devl4pp-sandy-lp3 sys]# cd sys
[root@devl4pp-sandy-lp3 sys]# for file in $(find . -name *lpfc*); do echo $file; cat $file; done

I found the file I needed:

[root@devl4pp-sandy-lp3 sys]# cat /sys/class/scsi_host/host1/lpfc_symbolic_name
Emulex PPN-10:00:00:00:c9:63:d2:ac

That’s it. Hopefully this will be part of a larger article. Meanwhile, let’s just use the blog to take notes 🙂


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s