LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PROBLEM] Can't start MD devices by using /dev/disk/by-id
@ 2007-02-13 21:51 Patrick Ale
  2007-02-14  0:37 ` Bill Davidsen
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Ale @ 2007-02-13 21:51 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PROBLEM] Can't start MD devices by using /dev/disk/by-id
  2007-02-13 21:51 [PROBLEM] Can't start MD devices by using /dev/disk/by-id Patrick Ale
@ 2007-02-14  0:37 ` Bill Davidsen
  2007-02-14  7:28   ` Patrick Ale
  0 siblings, 1 reply; 3+ messages in thread
From: Bill Davidsen @ 2007-02-14  0:37 UTC (permalink / raw)
  To: Patrick Ale; +Cc: linux-kernel

Patrick Ale wrote:
> 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.
> 
Just out of curiosity, why did you do this in such a manual way instead 
of just using the UUID? I would think every time you replace a failed 
drive you would have to go edit the files all over again.

-- 
Bill Davidsen <davidsen@tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PROBLEM] Can't start MD devices by using /dev/disk/by-id
  2007-02-14  0:37 ` Bill Davidsen
@ 2007-02-14  7:28   ` Patrick Ale
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Ale @ 2007-02-14  7:28 UTC (permalink / raw)
  To: Bill Davidsen; +Cc: linux-kernel

> >
> Just out of curiosity, why did you do this in such a manual way instead
> of just using the UUID? I would think every time you replace a failed
> drive you would have to go edit the files all over again.

Oh, there is a very simple reason for that.
These md arrays exist for a year of three allready, from the time I
used raidtool instead of mdadm.

So when I switched to to mdadm, I just got the /etc/raidtab file and
migrated it to /etc/mdadm.conf, since /etc/raidtab worked with
blockdevices and not UIDs (correct me if I am wrong and overlooked
this featute), the mdadm.conf ended up with these devices too.

Next to that, there is a, for me at least, practicle reason. I keep
adding harddisks, and when I use the block devices rather than UIDS,
and I get problems like yesterday, I have the blockdevice or serial
number of the disk, which makes it easier to look in my case where the
potential problem might be. If I work with UIDs and something goes
wrong when doing an mdadm --assemble, then I'll first have to look up
which disks belong to which UID, which costs time.

OR! which is also very possible, maybe there is a way easier way to
pinpoint which drives belong to which array before starting the array,
which I don't know about yet. So please, if you have suggestions, let
me know :)


Take care!

Patrick

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-14  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 21:51 [PROBLEM] Can't start MD devices by using /dev/disk/by-id Patrick Ale
2007-02-14  0:37 ` Bill Davidsen
2007-02-14  7:28   ` Patrick Ale

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).