2

Is there a way to tell the OS that /dev/sdd is really gone when I disconnect it and that it can reuse that letter?

I have RAIDs hooked up through fibre channel. I have it set up so that fstab will mount them and want this to continue when the device is disconnected and reconnected. The controller will be the same, the disks/RAID will not, so I don't believe UUID's will work. The devices will also be reformatted beyond my control, so mount by labels also does not work.

I've tried these commands, but have not had luck:

echo "1" > /sys/class/fc_host/host#/issue_lip
echo "- - -" > /sys/class/scsi_host/host#/scan

OS: CentOS 5.5

2 Answers 2

3

Check if you get links to your devices in /dev/disk/by-id (depends on distribution and udev configuartion and so on ...). I get links to the real device which names contain e.g. the unique serial number of my HDDs.

If with one of those links the unique identification is your device is possible, go and use this link in your fstab.

Otherwiese you can write a simple udev-rule, to generate a link to the real device.

I did never use FC myself, but needed static device file names for many different things (e.g. naming USB-GPRS-modems after IMSI or telephone number, ...)

1
  • Thanks, using /dev/disk/by-path worked (by-id grabbed some metadata from the disks, which changed when we swapped disks)
    – eruditass
    Sep 15, 2011 at 18:25
2

I think you're being very optimistic that Linux will always put the right device behind the right name. Honestly, I believe you're screwed. At the very least, get whoever's doing the reformatting to set a consistent label.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .