[SLL] /dev/sd names not in motherboard order

Derek Simkowiak dereks at realloc.net
Mon Mar 2 11:34:54 PST 2009


    I recently built a RAID box with 6 drives.  I used the two 
motherboard SATA controllers, plus a four-port PCI add-in SATA 
controller card.

    During the Ubuntu install, the first drive was /dev/sda.  After the 
first post-install boot, that had changed to /dev/sde.  I don't know how 
or why that would change... but the system functioned correctly.  Ubuntu 
uses the UUIDs for disk management.

    Note, UUIDs are not the factory "serial number" of the hard drive.  
It's just a random ID number that written onto the disk, in the 
partition table.  You can change the UUID to a new value with "tune2fs 
-U".  (You can see your UUIDs with "blkid".)

    I think Matt's problem may have something to do with using "dd" to 
copy the disk images.  When you use "dd", EVERYTHING gets copied, 
including the partition table.  The end result is that you'll have two 
drives with the same UUID.  This can confuse things like fstab, and it 
may be the root cause of Matt's problem.

    Here is an article about a guy who went nuts trying to build a RAID 
array, because he started off by using "dd" to clone his disk (thus 
getting two identical UUIDs on two different drives):

http://paulgoscicki.com/archives/2007/05/ubuntus-uuid-schizophrenia/

    Matt, I know you're not using RAID, but I think that article may 
shed some light on your situation re: dd and duplicated UUIDs.

    I would really like to understand how the device names (/dev/sda, 
etc.) are discovered and assigned by Linux.  When one of the drives in 
my 6-disk RAID box fails, I'll need to sit there, unplugging drives one 
by one from the motherboard to see which drive corresponds to the broken 
one.  (That's the one major disadvantage of Linux software RAID that 
I've found... hardware RAID gives you nifty blinkenlights on 
hot-swappable drives.)


--Derek Simkowiak

are not directly related to /etc/udev/

On 03/02/2009 11:10 AM, Phil Mocek wrote:
> On Mon, Mar 02, 2009 at 09:56:29AM -0800, Mathew D. Watson wrote:
>   
>> Paul Franz wrote:
>>     
>>> On Mon, March 2, 2009 7:22 am, Mathew D. Watson wrote:
>>>       
>>>> With one drive at each of SATA1, SATA2, and SATA3, their
>>>> /dev/sd names become sda, sdc, and sdb respectively.  / out of
>>>> order
>>>>
>>>> Finally, the motherboard connectors are physically positioned
>>>> in the following order. SATA1, SATA3, SATA2, SATA4.
>>>>         
>>> Looks like they are labeled incorrectly. Seems to me the order
>>> should be marked
>>>
>>> SATA1, SATA2, SATA3, SATA4
>>>
>>> Wouldn't that solve the problem?
>>>
>>>       
>> Yup. That would solve the problem. At least the system would
>> work as I  think it should. On the other hand, I have a nagging
>> feeling that more  is at play here.
>>     
>
> I wouldn't rely on that unless someone can confirm that its not
> just coicidentally correct.  Do we know how /dev/sd* are assigned?
>
> IIRC, some of this changes when I enable/disable ATA/SATA in one
> of my machines' BIOSes.  I believe that using /dev/disk/by-uuid/*
> avoids all this.  I typically leave a comment in fstab with something
> more useful than /dev/disk/by-uuid/c8b8e289-4722-4230-af73-298dd7a42892.
>
>   


More information about the linux-list mailing list