Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Raid intermittently fails to start automatically
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Conditional_Zenith
Apprentice
Apprentice


Joined: 22 Sep 2004
Posts: 150
Location: Australia

PostPosted: Sat May 30, 2015 12:08 pm    Post subject: Raid intermittently fails to start automatically Reply with quote

I have a raid0 and a raid1 set up on my system. The raid1 consistently starts on system start, but the raid0 only sometimes does. When it doesn't I get 2 separate md devices, which I can manually stop and reassemble into the working raid. I was previously using a custom initrd, but I have since stopped using it, which is about when this issue started.

The raid that doesn't correctly start is the sdb10/sdc8 one. md122 is not used any more, so I'm unconcerned that it is degraded.
Code:

root@~> cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10]
md127 : inactive sdc8[1](S)
      97659095 blocks super 1.2
       
md122 : active raid1 sdc1[1]
      48064 blocks [2/1] [_U]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md125 : active raid1 sdc7[1] sdb9[0]
      183727232 blocks [2/2] [UU]
      bitmap: 0/2 pages [0KB], 65536KB chunk

md0 : inactive sdb10[0](S)
      97659095 blocks super 1.2
       
unused devices: <none>
root@~>


Code:

root@~> mdadm -D /dev/md?*
/dev/md0:
        Version : 1.2
     Raid Level : raid0
  Total Devices : 1
    Persistence : Superblock is persistent

          State : inactive

           Name : franklin:0  (local to host franklin)
           UUID : b66fd4de:7ca9bb13:55ea506d:47842611
         Events : 0

    Number   Major   Minor   RaidDevice

       -       8       26        -        /dev/sdb10
/dev/md122:
        Version : 0.90
  Creation Time : Sat Feb 11 00:28:18 2012
     Raid Level : raid1
     Array Size : 48064 (46.95 MiB 49.22 MB)
  Used Dev Size : 48064 (46.95 MiB 49.22 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 122
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Mar 26 18:44:40 2015
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : 6f2f97f9:e12cb29a:71b486bc:a141638d (local to host franklin)
         Events : 0.88

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8       33        1      active sync   /dev/sdc1
/dev/md125:
        Version : 0.90
  Creation Time : Sat Feb 11 00:29:32 2012
     Raid Level : raid1
     Array Size : 183727232 (175.22 GiB 188.14 GB)
  Used Dev Size : 183727232 (175.22 GiB 188.14 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 125
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Sat May 30 21:40:41 2015
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : 2c2ddaf7:2c769155:71b486bc:a141638d (local to host franklin)
         Events : 0.1670

    Number   Major   Minor   RaidDevice State
       0       8       25        0      active sync   /dev/sdb9
       1       8       39        1      active sync   /dev/sdc7
/dev/md127:
        Version : 1.2
     Raid Level : raid0
  Total Devices : 1
    Persistence : Superblock is persistent

          State : inactive

           Name : franklin:0  (local to host franklin)
           UUID : b66fd4de:7ca9bb13:55ea506d:47842611
         Events : 0

    Number   Major   Minor   RaidDevice

       -       8       40        -        /dev/sdc8


Relevant dmesg
Code:

[    1.750306] md: Waiting for all devices to be available before autodetect
[    1.750613] md: If you don't use raid, use raid=noautodetect
[    1.751028] md: Autodetecting RAID arrays.
[    1.806029] md: invalid raid superblock magic on sdb10
[    1.806318] md: sdb10 does not have a valid v0.90 superblock, not importing!
[    1.838235] md: invalid raid superblock magic on sdc8
[    1.838533] md: sdc8 does not have a valid v0.90 superblock, not importing!
[    1.838840] md: Scanned 6 and added 4 devices.
[    1.839125] md: autorun ...
[    1.839408] md: considering sdc7 ...
[    1.839708] md:  adding sdc7 ...
[    1.839997] md: sdc1 has different UUID to sdc7
[    1.840285] md:  adding sdb9 ...
[    1.840576] md: sdb1 has different UUID to sdc7
[    1.840968] md: created md125
[    1.841253] md: bind<sdb9>
[    1.841551] md: bind<sdc7>
[    1.841843] md: running: <sdc7><sdb9>
[    1.842450] md/raid1:md125: active with 2 out of 2 mirrors
[    1.842895] created bitmap (2 pages) for device md125
[    1.843340] md125: bitmap initialized from disk: read 1 pages, set 0 of 2804 bits
[    1.880653] md125: detected capacity change from 0 to 188136685568
[    1.880953] md: considering sdc1 ...
[    1.881242] md:  adding sdc1 ...
[    1.881529] md:  adding sdb1 ...
[    1.881932] md: created md122
[    1.882215] md: bind<sdb1>
[    1.882506] md: bind<sdc1>
[    1.882804] md: running: <sdc1><sdb1>
[    1.883222] md: kicking non-fresh sdb1 from array!
[    1.883510] md: unbind<sdb1>
[    1.888571] md: export_rdev(sdb1)
[    1.889069] md/raid1:md122: active with 1 out of 2 mirrors
[    1.889485] created bitmap (1 pages) for device md122
[    1.889924] md122: bitmap initialized from disk: read 1 pages, set 0 of 1 bits
[    1.914952] md122: detected capacity change from 0 to 49217536
[    1.915251] md: ... autorun DONE.


mdadm.conf has no lines that aren't commented. I have no custom udev rules for 64-md-raid-assembly.rules (ie. only the version in /lib/udev/rules.d). The mdraid init script is not in any runlevels.

So the obvious difference is the 1.2 superblock. I'm guessing the other raid reliably auto assembles due to the 0.9 superblock which the kernel understands.

My understanding is that udev should auto assemble the raid, which it seems to be doing some of the time.

I can manually run this to get the raid assembled (which hosts an LVM PV, which I can then successfully start).
Code:

mdadm --stop /dev/md0 /dev/md127
mdadm --assemble /dev/md0 /dev/sdb10 /dev/sdc8

Code:

root@~> cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10]
md0 : active raid0 sdb10[0] sdc8[1]
      195317760 blocks super 1.2 512k chunks

md122 : active raid1 sdc1[1]
      48064 blocks [2/1] [_U]
      bitmap: 0/1 pages [0KB], 65536KB chunk

md125 : active raid1 sdc7[1] sdb9[0]
      183727232 blocks [2/2] [UU]
      bitmap: 0/2 pages [0KB], 65536KB chunk

unused devices: <none>
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Mon Jun 01, 2015 9:15 pm    Post subject: Reply with quote

For some reason the sdc8/sdb10 isn't in your dmesg, even though there should be a few messages pertaining to that if the md devices were created at all...

It's better to have a mdadm.conf. Example: https://wiki.gentoo.org/wiki/Custom_Initramfs#mdadm
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum