RAID array not detected on boot
I have a raid array level 5 with metadata 1.2 made with mdadm. I put it on /etc/fstab to mount it on boot but it doesn't works because the raid is not detected on boot.
I have a /etc/mdadm.conf like this: Code:
ARRAY /dev/md0 level=raid5 num-devices=3 metadata=1.2 name=0 UUID=afdfe00e:0d18a5eb:29aa54f9:8b422ee0 After the command Code:
mdadm --detail --scan >> /etc/mdadm.conf Code:
ARRAY /dev/md0 level=raid5 num-devices=3 metadata=1.02 name=0 UUID=afdfe00e:0d18a5eb:29aa54f9:8b422ee0 Beside this. I have to put a line in /etc/rc.d/rc.local to assemble the array. Code:
mdadm --assemble --scan --uuid=afdfe00e:0d18a5eb:29aa54f9:8b422ee0 Why the array is not detected on boot? Is because metadata type is prior to 1.00? Can I put the line I have on /etc/rc.d/rc.local to assemble the array in another file, that will be executed before /etc/fstab? |
What version of Slackware? Are you using an initrd? What does "mdadm -E -s" give you?
|
Slackware 13.1
I am not using any initrd. mdadm -E -s gives: Code:
ARRAY /dev/md/0 level=raid5 metadata=1.2 num-devices=3 UUID=afdfe00e:0d18a5eb:29aa54f9:8b422ee0 name=0 |
OK, if you boot with an initrd, you'll get your raid array created for you. That's pretty much the only way you can do it. On the plus side, it's pretty easy to boot with an initrd.
Perhaps the best thing to do is to run Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh --longhelp |
Nop. I use the kernel shipped with slackware.
|
OK.
The only mdadm code that is run during boot is found in the initrd's init script. Anything that you put in rc.local is run at the end of /etc/rc.d/rc.M, which is at the end of the multiuser boot. The long instructions for the mkinitrd_command_generator.sh command (which is what you get when you run the command line that I gave above) tells you pretty much everything that you need to do. /boot/README.initrd will tell you everything else that you need to know. (I don't know why the RAID autodetect stuff isn't also in /etc/rc.d/rc.S. The LVM code is in the initrd init script and in /etc/rc.d/rc.S.) |
All times are GMT -5. The time now is 06:59 PM. |