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

Brian Lane bcl at brianlane.com
Mon Mar 2 11:48:28 PST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/2/09 11:34 AM, Derek Simkowiak wrote:

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

Actually, I think I have the answer for that. Maybe. From my noes when I
bult my 4 drive software RAID:

The SATA driver creates a separate bus for each SATA connector. The
/dev/sdX device is then associated with a bus. This is listed in dmesg,
but should be available somewhere else as well...

Ok, /sys/block/sdX/device is a symlink to the scsi host bus that it is
attached to. So, I just need to associate those busses with the drawers.
1 	3:0:0:0
2 	1:0:0:0
3 	0:0:0:0
4 	2:0:0:0

sda, sdb, sdc, sdd all get assigned based on which drives are active.
You need to look at /sys/block/sdX/device to determine which drive is
actually in need of replacement.

Brian


- -- 
- ---[Office 75.2F]--[Outside 51.5F]--[Server 103.3F]--[Coaster 62.0F]---
- ---[       ALEXANDRA (240572000) @ 47 37.4280 -122 23.7640        ]---
Software, Linux, Microcontrollers             http://www.brianlane.com
AIS Parser SDK                                http://www.aisparser.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Remember Lexington Green!

iD8DBQFJrDgMIftj/pcSws0RApfqAJ4kCW3eVy6G6zBJVojHAiU3CijRFQCeOz9Z
WirjftRq5ZdxgimTlMCX8eQ=
=sqjo
-----END PGP SIGNATURE-----


More information about the linux-list mailing list