[PROBLEM] Can't start MD devices by using /dev/disk/by-id

From: Patrick Ale
Date: Tue Feb 13 2007 - 16:52:02 EST


Hi chaps,

I just came home, rebooted my box to git8 and *gasp* a problem :)

I can't start my MD devices anymore by defining /dev/disk/by-id/*
devices in /etc/mdadm.conf.

When I do a: mdadm --assemble /dev/md/1 it tells me "No devices found
for /dev/md/1"
When I edit the file /etc/mdadm.conf and change the /dev/disk/by-id/*
to whatever the symbolic links points to in the /dev directory, it
does work.

An example:

-- mdadm.conf
ARRAY /dev/md/1
devices=/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMAEL2258179-part1,/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1329740-part1
#ARRAY /dev/md/1 devices=/dev/sdb1,/dev/sdf1
ARRAY /dev/md/2 devices=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L609D78H-part1
ARRAY /dev/md/3
devices=/dev/disk/by-id/scsi-SATA_WDCD1600JB-00WD-WMAEK2977810-part1,/dev/disk/by-id/scsi-SATA_Maxtor_6Y160P0_Y48BCM3E-part1
-- end mdadm.conf --

localhost by-id # pwd
/dev/disk/by-id

localhost by-id # mdadm --assemble /dev/md/1
mdadm: no devices found for /dev/md/1


Let's change the config file now

-- mdadm.conf --
#ARRAY /dev/md/1
devices=/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMAEL2258179-part1,/dev/disk/by-id/scsi-SATA_WDC_WD1200JB-00WD-WMACM1329740-part1
ARRAY /dev/md/1 devices=/dev/sdb1,/dev/sdf1
ARRAY /dev/md/2 devices=/dev/disk/by-id/scsi-SATA_Maxtor_6L250R0_L609D78H-part1
ARRAY /dev/md/3
devices=/dev/disk/by-id/scsi-SATA_WDCD1600JB-00WD-WMAEK2977810-part1,/dev/disk/by-id/scsi-SATA_Maxtor_6Y160P0_Y48BCM3E-part1

And
localhost by-id # mdadm --assemble /dev/md/1
mdadm: /dev/md/1 has been started with 2 drives.


Now, granted, it's 22:49 and i had a sucky day at work but... this
doesnt make any sense to me.

So, I tried to use the vanilla 2.6.20 kernel, same problem.

Here is a listing of symbolic links in /dev/disk/by-id , as you can
see the initial mdadm.conf (which worked prior to 2.6.20) should work,
since the links to the actual device nodes seem to be correct and
taking in account the MD devices do start when using the /dev/ nodes.

lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_Maxtor_6L250R0_L609D78H -> ../../sdc
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_Maxtor_6L250R0_L609D78H-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_Maxtor_6Y160P0_Y48BCM3E -> ../../sde
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_Maxtor_6Y160P0_Y48BCM3E-part1 -> ../../sde1
lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_WDC_WD1200JB-00WD-WMACM1329740 -> ../../sdf
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD1200JB-00WD-WMACM1329740-part1 -> ../../sdf1
lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_WDC_WD1200JB-00WD-WMAEL2258179 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD1200JB-00WD-WMAEL2258179-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_WDC_WD1600JB-00WD-WMAEK2977810 -> ../../sdd
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD1600JB-00WD-WMAEK2977810-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 9 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 Feb 12 05:40
scsi-SATA_WDC_WD2000JB-00_WD-WCAL81971867-part6 -> ../../sda6
lrwxrwxrwx 1 root root 9 Feb 12 05:40
usb-USB2.0_CardReader_CF_RW_586148026074 -> ../../sdg


Cheers,

Patrick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/