Saturday, May 9, 2009

Obtaining the WWPN of fibre channel HBAs

Last week, I installed all of the equipment in our beta site. Due to issues with the power at my office, I wasn't able to touch the blades for the month or so before they went in the rack, and the last time they were powered on, I didn't have the storage array to make sure that they could talk. Now I'm in the position of needing to match up which connected HBAs go to which machines. 

Researching, I found this entry on a blog called "sysdigg". Sysdigg looks like an interesting blog until you go to the current site, where it's mostly spam and ads. I'm not sure what happened, but at least back in 2007 it looked informative. 

Anyway, the key lies in having a modern kernel and sysfs. There's a class called fc_host with the appropriate info: 

> cat /sys/class/fc_host/host*/port_name

This is more documentation for myself, since I always forget, but maybe it will help someone else too.