Bug 11458 - md: Autodetecting RAID arrays. - but does detect and assembles md0, md1 only out of 3
Summary: md: Autodetecting RAID arrays. - but does detect and assembles md0, md1 only ...
Status: CLOSED OBSOLETE
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: MD (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: io_md
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-30 01:55 UTC by paolo
Modified: 2012-05-22 13:39 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.26.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description paolo 2008-08-30 01:55:00 UTC
hello,

I've setup 3 partitions on 2 SATA HDD as md0, md1, md2.
I'd expect autodetection and assembling on boot for all of them, but only the 
2st 2 get up&running. Of course, Murphy's law wanted me to set md2 as / so I 
get a kernel panic.

dmesg shows:
...
md: Autodetecting RAID arrays.
md: Scanned 2 and added 2 devices.
md: autorun ...
md: considering sda6 ...
md:  adding sda6 ...
md: sda5 has different UUID to sda6
md: created md1
md: bind<sda6>
md: running: <sda6>
raid1: raid set md1 active with 1 out of 2 mirrors
md: considering sda5 ...
md:  adding sda5 ...
md: created md0
md: bind<sda5>
md: running: <sda5>
raid1: raid set md0 active with 1 out of 2 mirrors
md: ... autorun DONE
...
(degraded as I had to remove sata2, which had defects)

mdadm config is:

# cat /etc/mdadm.conf 
DEVICE /dev/sd*[1-9] /dev/sd*1[0-5]
DEVICE /dev/hd*[1-9] /dev/hd*1[0-9]
ARRAY /dev/md2 super-minor=2
ARRAY /dev/md0 super-minor=0 
ARRAY /dev/md1 super-minor=1

here -Q and -E from mdadm for device 0 of md2:

# mdadm -Q /dev/sda3
/dev/sda3: is not an md array
/dev/sda3: device 0 in 2 device undetected raid1 /dev/md2.  Use mdadm --examine for more detail.
# mdadm -E /dev/sda3 
/dev/sda3:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : d9d33359:a4d47baa:a395baa4:6d2aa0a8
  Creation Time : Thu Aug 28 20:05:33 2008
     Raid Level : raid1
  Used Dev Size : 192640 (188.16 MiB 197.26 MB)
     Array Size : 192640 (188.16 MiB 197.26 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 2

    Update Time : Fri Aug 29 01:58:35 2008
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : ca04a75f - correct
         Events : 8


      Number   Major   Minor   RaidDevice State
this     0       8        3        0      active sync   /dev/sda3

   0     0       8        3        0      active sync   /dev/sda3
   1     1       8       17        1      active sync   /dev/sdb1


Manually assmebling md2 with mdadm succeedes with no warnings. 
Setting boot-param: md=2,/dev/sda3,/dev/sdb1 makes things work:

# cat /proc/mdstat /proc/cmdline 
Personalities : [linear] [raid0] [raid1] 
md2 : active raid1 sda3[0]
      192640 blocks [2/1] [U_]
      
md1 : active raid1 sda6[0]
      238340224 blocks [2/1] [U_]
      
md0 : active raid1 sda5[0]
      5662784 blocks [2/1] [U_]
      
unused devices: <none>

and in dmesg:
...
md: Autodetecting RAID arrays.
md: Scanned 2 and added 2 devices.
md: autorun ...
md: considering sda6 ...
md:  adding sda6 ...
md: sda5 has different UUID to sda6
md: created md1
md: bind<sda6>
md: running: <sda6>
raid1: raid set md1 active with 1 out of 2 mirrors
md: considering sda5 ...
md:  adding sda5 ...
md: created md0
md: bind<sda5>
md: running: <sda5>
raid1: raid set md0 active with 1 out of 2 mirrors
md: ... autorun DONE.
md: Unknown device name: sdb1
md: Loading md2: /dev/sda3
md: bind<sda3>
raid1: raid set md2 active with 1 out of 2 mirrors
...

but that's not a robust solution, as I've seen sdb sometimes renamed as 
sdc - that's why I used super-minor in mdadm.conf instead of explict 
device names.

So question (bug?) is, why the md driver autodetects 0,1 only? I failed to 
find clues in the docs (like some driver option to tell it to scan up to 
some max super-minor and the like).


thanks
Comment 1 Alan 2012-05-22 13:39:54 UTC
Marking as obsolete, please re-open and update the kernel version if still a problem

Note You need to log in before you can comment on or make changes to this bug.