Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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, ...)

share|improve this answer
    
Thanks, using /dev/disk/by-path worked (by-id grabbed some metadata from the disks, which changed when we swapped disks) –  Eruditass Sep 15 '11 at 18:25

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.