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

Mathew D. Watson watson at visiongate3d.com
Mon Mar 2 07:22:50 PST 2009


My motherboard has sata drive connectors SATA1, SATA2, SATA3, ...

With one drive installed on any connector, its device name is /dev/sda 
when linux (ubuntu 8.10) runs.

With one drive at SATA1 and another drive on any other connector, SATA1 
becomes /dev/sda and the other becomes /dev/sdb.

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.

I am confused by the ordering. The only correlation I found is the 
physical ordering, but that sounds dubious.  Searching the internet 
turned up /etc/udev/rules.d/*, but the rules use commands like ata_id, 
which seem to assume the /dev/sd names have already been assigned (i.e. 
they take a block device name as an argument).

Any comments, explanations, or pointers appreciated.

Why do I care? I am using dd to make a back up image of my working hard 
disk, and two of my drives are identical. Because the sdb and sdc order 
was reversed, I copied my image to the wrong drive. Fortunately this 
only resulted in my trying to boot from an unformatted drive. However, I 
can easily imagine how one might accidentally write onto the drive that 
is being backed up.

Mat


More information about the linux-list mailing list