This seems a good post to followup to with another handy scsi(8) trick.

On 2009-11-15, Marco Peereboom <sl...@peereboom.us> wrote:
> # scsi -f /dev/rsd0c -c "03 00 00 00 fc 00 00" -i 0xfc - | hexdump -C
> 00000000  70 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |p...............|
> 00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 |................|
> *
> 000000f0  00 00 00 00 00 00 00 00  00 00 00 00             |............|
> 000000fc
>
> byte 0  has to be 0x70 or 0x71
> byte 7  has to be >= 10
> byte 12 is 0x5d if you have a smart trip
>
> this drive is clean!
>
> Figuring out the -i format is left as an exercise for the reader.

If you're trying to track down fibrechannel mappings (e.g. in case
you made careful notes on a piece of paper when you set them up but
your rabbit ate it) it can sometimes be useful to determine the WWN's
of connected targets. You can do it like this. (WWNs of the HBA are
easier, they're printed when the device attaches, so you can find
them in dmesg).

# scsi -f /dev/rsd0c -c "12 1 83 0 50 0" -i 0x50 - | hexdump -C | tail -2
00000000  00 83 00 48 02 01 00 24  41 50 50 4c 45 20 20 20  |...H...$APPLE   |
00000010  58 73 65 72 76 65 20 52  41 49 44 20 20 20 20 20  |Xserve RAID     |
00000020  4b 43 33 34 31 30 30 48  59 50 47 51 01 03 00 08  |KC34100HYPGQ....|
00000030  50 00 39 30 00 00 32 93  01 03 00 10 60 00 39 30  |P.90..2.....`.90|
00000040  00 00 32 93 01 00 00 00  ff 10 b1 ac 00 00 00 00  |..2......1,....|

bytes 30...38 are WWPN, 3c...43 are WWNN.

Reply via email to