2012-11-26

Untangling HBA multipath

How can you check what HBA is used for a given device?
If you are using multipath, which device is using which port?

Let's say we need to check /dev/sdc
First, check which scsi_device belongs to it:

# ls -l /sys/class/block/sdc/device/scsi_device/
drwxr-xr-x 3 root root 0 Jul 20 12:22 1:0:0:0/


The "1" above means that the device is seen through host1.
Now we can look at host1:

# cat /sys/class/scsi_host/host1/info
Emulex LPe11002-M4 4Gb 2port FC: PCIe SFF HBA on PCI bus 02 device 00 irq 66 port 1

so, it's the second port of an Emulex adapter.

2012-11-03

Calling out for a car key standard

Here are a couple of car keys from two different brands:


On the left, you have the lock button up the unlock button down.
On the right you have the unlock button up, and the unlock down.
The first has two raised bumps on the lock button and no bumps on the unlock.
The second has one bump on the unlock and no bumps on the lock button.

It's simply impossible to lock and unlock the car without getting the keys out of the pocket and looking at them.