LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-27-2004, 04:59 PM   #1
robbow52
Member
 
Registered: Oct 2003
Location: Kentucky, USA
Distribution: Debian "SID"
Posts: 110

Rep: Reputation: 15
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!
 
Old 04-19-2004, 04:37 AM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
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?
 
Old 04-19-2004, 08:06 PM   #3
robbow52
Member
 
Registered: Oct 2003
Location: Kentucky, USA
Distribution: Debian "SID"
Posts: 110

Original Poster
Rep: Reputation: 15
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 04:35 PM
Linux raid with mdadm eyt Linux - Newbie 6 02-07-2006 06:26 AM
Mailing with MDADM RAID rootking Linux - Hardware 1 07-26-2005 05:47 PM
help me setup software raid 1 on slackware with mdadm xrado Slackware 2 03-02-2005 06:50 AM
mdadm mail with software RAID brucehohl Linux - Software 1 12-20-2003 07:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration