[ILUG] How do I map fibre channel to absolute /dev/sgxx
Jeroen Massar
jeroen at unfix.org
Mon Nov 13 18:28:03 GMT 2006
Patrick Tuite wrote:
> Hi all
>
> I had a bit of a problem with a fibre channel tape library. We recently moved
> a bunch of systems, some connected to a fibre channel switch with the tape
> library & storage arrays and discovered when running scripts for Amanda that
> the tape library media changer, previous mapped to /dev/sg6, had changed
> to /dev/sg1. All the cabling was marked and reassembled identically.
>
> I was wondering if anyone knew a quick way to map the SCSI ID for a device to
> a particular block device id when the system boots to avoid having to edit
> the scripts each time it may change if the systems are ever restarted?
On anything with udev support you should be able to find them inside:
/dev/disk/by-id/
/dev/disk/by-path/
/dev/disk/by-uuid/
Depending what is the most convenient labeling mechanism for your needs.
by-path is most likely the one you want in this case.
Gives you for instance:
/dev/disk/by-path$ ls -la
lrwxrwxrwx 1 root root 9 Jul 27 16:05 pci-0000:02:04.0-scsi-0:0:1:0 ->
../../sda
Greets,
Jeroen
More information about the ILUG
mailing list