[lug] Kernel reorders SCSI drives.

George Sexton gsexton at mhsoftware.com
Tue Oct 31 14:04:47 MST 2006

This is why you should label your disk partitions, and edit your fstab 
file to mount based on labels and not device names. This functionality 
has been around for a LONG time. I'm surprised no one else has brought 
it up.

David L. Anselmi wrote:
> I have a 2.6.17 box with 2 SATA drives and 1 USB drive.  They used to 
> be sd[a-c] respectively.  For a while the kernel has been assigning 
> those names randomly to the drives.
> It would seem that udev is the way around this.  First I made a rule 
> to match the USB drive and call it sdc so that sda and sdb would be 
> free (they are part of a RAID so I don't really care which is which).
> Then I made rules to match each drive and assign the right name.  
> Either way it seems that a rename fails (because the name is already 
> in use?) so one of the drives isn't visible.
> For example, if USB is sda and a SATA drive is sdc I'll get the USB 
> drive called sdc but no sda*.  I can use udevinfo to see what the 
> original kernel name is.  And in this case sdc will have numbers 8, 0 
> and sdc1 is 8, 1 (the numbers go with the first detected drive and 
> don't change when udev renames things).
> I would have thought that even with all the fancy udev/hotplug stuff 
> I'd still be able to use the usual names but it seems I can't.
> To work around this I'm going to rename everything to something new 
> and ignore the kernel's idea about names.  But it seems unnecessarily 
> clumsy to have to update that list any time a new drive is added.  
> Anyone have a better way?
> Thanks!
> Dave
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

More information about the LUG mailing list