LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Software RAID with mdadm problems... (https://www.linuxquestions.org/questions/debian-26/software-raid-with-mdadm-problems-163133/)

robbow52 03-27-2004 04:59 PM

Software RAID with mdadm problems...
 
I am in the process of trying to create a software raid using the "missing" disk option of mdadm. I'm following the instructions at:

http://rootraidoc.alioth.debian.org

I have two identical 18.4gig SCSI disks. I partitioned the first disk:
/dev/sda1= /boot
/dev/sda2= swap
/dev/sda3= /
/dev/sda5= /tmp
/dev/sda6= /var
/dev/sda7= /usr
/dev/sda8= /usr/local
(I have /home on it's own separate drive.) The swap drive was formatted to Linux Swap and all the rest were formatted to ext3.

I then proceeded to do a base install of Debian Woody 3.0r1 on this disk with RAID compiled in the kernel (both raid1 and raid5) and I installed mdadm.

Using cfdisk, I duplicated the partitions of the first disk on the second. I set each of the partiton types on this drive to Linux Raid Autodetect (fd).

I then proceeded to create the RAID:

mdadm --create /dev/md1 --level=1 --raid-disks=2 missing /dev/sdb1
mdadm --create /dev/md2 --level=1 --raid-disks=2 missing /dev/sdb2
...and so forth for each of the partitions. I formatted each of the drives, mkfs.ext3 /dev/mdx for the regular partitions and mkswap /dev/sdb2 for the swap partiton.

This all proceeded fine and when done, cat /proc/mdstat showed the raid running fine (with the "missing/failed" devices of course)... I created mount points for each of the devices, i.e. /dev/md1 /mnt/md1 etc. I was even able to mount the devices and copy the file system from the "missing" devices to the mdx devices.

The problem enters in when I reboot the pc. I added the various devices and their mount points to fstab:
/dev/md1 /mnt/md1 ext3 defaults 0 0 and so forth for each of the md devices.

Then I reboot and the raid does not start... If I change the "pass" in fstab to "1" or "2", then I get an fschk error "unable to read superblock" error on each of the raid devices... and again, the raid does not start. (During the fs creation, I can see the superblocks being created...)

Any thoughts or ideas???

Thanks in advance for your help!

ToniT 04-19-2004 04:37 AM

Do you try to boot from raid device? Are you using initial ramdisk? Yes to both, did you regenerate the ramdisk so that mkinitrd was aware that you are going to boot from raid?

robbow52 04-19-2004 08:06 PM

Software Raid 1 problems
 
Quote:

Originally posted by ToniT
Do you try to boot from raid device? Are you using initial ramdisk? Yes to both, did you regenerate the ramdisk so that mkinitrd was aware that you are going to boot from raid?
Actually, no to both. I had "thought" that I had compiled Raid 1, Raid 5 and LVM into the kernel during installation (2.4.18), but I now think that I missed something... I compiled a "new" kernel, 2.6.5 and upon boot, it starts the raid just fine! I still don't have everything working completely, but I think I'm on the right track.

Thanks for your ideas and I'll file them into my "toolbox" for future referance!


All times are GMT -5. The time now is 12:20 PM.