Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an openSUSE 11.3 Linux computer with 5 disks of 1TB (WD enterprise disks) in it. With mdadm I configured a RAID6 device.

Now, after a lot of thorough testing, I've noticed that when the computer goes down unsuspectedly it could happen (1 time out of 10) that while booting, the md0 device isn't recognised, and then the machine goes in "recovery mode", which means that I have to 'CTRL+C' it so it can boot to openSUSE. Once in openSUSE I have to re-add the drive manually with mdadm /dev/md0 --add /dev/sdX. After this everything works back fine (after resynching).

So my question is: Is there a way to auto-rebuild the RAID6 device when there are problems? And how can I stop this "recovery mode" from happening. Because the computer will be in a place I can't go to, to connect a keyboard, 'CTRL+C' it just to get in openSUSE.

My files:

cat /etc/mdadm.conf

DEVICE containers partitions
ARRAY /dev/md0 UUID=d300b3c5:553c4f26:ce909d5a:0f456417
cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4]
md0 : active raid6 sdb1[0] sdf1[5] sde1[3] sdd1[2] sdc1[1]
   2930281728 blocks super 1.0 level 6, 128k chunk, algorithm 2 [5/5] [UUUUU]
   bitmap: 0/466 pages [0KB], 1024KB chunk

unused devices: <none>
cat /etc/fstab

/dev/disk/by-id/ata-ST3500418AS_9VM6LN3Y-part1 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST3500418AS_9VM6LN3Y-part2 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-ST3500418AS_9VM6LN3Y-part3 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/disk/by-id/md-uuid-d300b3c5:553c4f26:ce909d5a:0f456417 /home/mobotix        ext4       acl,user_xattr        1 2
share|improve this question
    
are you using a /etc/mdadm.conf file, and is md0 showing "persistant superblock" (cat /proc/md0) –  Sirex Feb 1 '11 at 15:21
    
Try posting those files here (inside a code block) as well as the content of /etc/fstab –  TimothyP Feb 6 '11 at 22:12
2  
Welcome to Super User. Note that we're NOT a forum! Next time please edit your question (using the same user: superuser.com/users/65632/user65632), rather than adding "answers". Success! –  Arjan Feb 10 '11 at 11:52
    
The thing is that I already have an mdadm.conf!!! if I make a /etc/mdadm.conf with that command, that won't change a thing! why?? ==> assume that my server boots with a broken RAID (Drive 3 'broken') first of all, my server will go into recovery mode (NO netwerk enabled) so i have to go to my server and ctrl+c it! and if i put the command you say, it will make a /etc/mdadm.conf with all the disks EXCEPT drive 3. because it has failed according to the server (which it didn't!!) correct me if I'm wrong! –  user66983 Feb 22 '11 at 9:23

1 Answer 1

Just create a new mdadm.conf file:

$su

#mdadm --detail --scan --verbose > /etc/mdadm.conf

And you're done.

share|improve this answer
    
The author of the question does not understand how this will help him, and for some reason he cannot add comments himself. Can you please explain what this will do ? –  TimothyP Feb 11 '11 at 20:18
    
yep.. almost OS automatically scans and activates the disk arrays.And because the system doesn't automatically create a file to remember components/partitions of the RAID set, so we just help it. –  beth22 Feb 16 '11 at 4:24
    
The thing is that I already have an mdadm.conf! if I make a /etc/mdadm.conf with that command, that won't change a thing! why? ==> assume that my server boots with a broken RAID (Drive 3 'broken') first of all, my server will go into recovery mode (NO netwerk enabled) so i have to go to my server and ctrl+c it! and if i put the command you say, it will make a /etc/mdadm.conf with all the disks EXCEPT drive 3. because it has failed according to the server (which it didn't!!) correct me if I'm wrong! –  user66983 Feb 22 '11 at 9:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.