Raid1 and mdadm
Hello
I am a Linux newbie, using Redhat Linux 7.3 Kernel 2.4.18-17.7.x on an Asus 7V333 with Promise Raid Controller (disabled).
I would like to understand more about Raid in a Linux environment, except that all the documentation I have read seems not to apply to my case.
I understand that mdadm is better than raidtools, but I still cannot get my head around the concept of how Linux Raid works.
Neil Brown gave a reply to splee in April, which seems to be relatively straightforward - however, when I try this method, I get a kernel panic.
My setup is as follows:
GRUB boot loader
hda1 /boot
hda2 /
hda3 swaphdd1 (intended) mirror partition of /
I can create the (degraded) array on hdd1, mkfs on /dev/md0, mount /dev/md0 as /mnt, copy / to /mnt, and edit /mnt/etc/fstab.
Everything works well up to the point where I reboot, with kernel parameters (md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.
I think that I have not edited fstab properly, or GRUB is getting in the way, or maybe it is not possible to add hda2 to the array because it already has a filesystem on it.... How do I get hda2 to be part of the Raid array? Nothing attempted so far has made any impression on the fact that mdadm insists that /dev/hda2 is not an md component.
I hope that this is enough info.
Best regards
Max Booker
Quoted 5 lines · Max Booker
Hello
Everything works well up to the point where I reboot, with kernel parameters (md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.
Quoted 7 lines
I think that I have not edited fstab properly, or GRUB is getting in the way, or maybe it is not possible to add hda2 to the array because it already has a filesystem on it.... How do I get hda2 to be part of the Raid array? Nothing attempted so far has made any impression on the fact that mdadm insists that
/dev/hda2is not an md component.I hope that this is enough info.
It isn't. We'll need to see the panic, and the things leading up to it, to be able to diagnose what's happening.
Does your kernel have the software raid compiled in, or as modules? If it's modules, you'll need an initial ramdisk (initrd).
You can add hda2 to the array, after you've successfully booted off the array.
Signature · 9 lines
Mads Peter Bach Systemadministrator, Det Humanistiske Fakultet, Aalborg Universitet Kroghstræde 3 - 5.111, DK-9220 Aalborg Øst # whois [email protected] - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Max Booker
GRUB boot loader
hda1 /boot hda2 / hda3 swaphdd1 (intended) mirror partition of /
I can create the (degraded) array on hdd1, mkfs on
/dev/md0, mount/dev/md0as /mnt, copy / to /mnt, and edit/mnt/etc/fstab.
Quoted 9 lines
Everything works well up to the point where I reboot, with kernel parameters (md=0,/dev/hdd1 root=/dev/md0). This is where the kernel panics.
I think that I have not edited fstab properly, or GRUB is getting in the way, or maybe it is not possible to add hda2 to the array because it already has a filesystem on it.... How do I get hda2 to be part of the Raid array? Nothing attempted so far has made any impression on the fact that mdadm insists that
/dev/hda2is not an md component.
As far as I know you have to use LILO instead of GRUB to boot from a root raid. Take care that raid1 is compiled into the kernel.
Signature · 2 lines
MfG / Regards Friedrich Lobenstock