Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-31-2005, 08:23 AM   #1
Registered: Sep 2003
Posts: 76

Rep: Reputation: 15
Linux raid with mdadm

I set up raid 1 (2 SATA disks) using mdadm. The partition table description is as follows:

SATA disk 1:

/dev/sda1 /boot 790M Linux raid autodetect
Old 08-31-2005, 10:12 AM   #2
Registered: Sep 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Raid 1 mdadm

Hi all,

I set up raid 1 using mdadm with 2 SATA disks
The partition table for SATA drive A details:

/dev/sda1 /boot Linux raid autodetect
/dev/sda2 Extended
/dev/sda5 / Linux raid autodetect
/dev/sda6 swap Linux swap
/dev/sda7 /usr Linux
/dev/sda8 /var Linux
/dev/sda9 /home Linux
/dev/sda10 /tmp Linux

Partition table for SATA drive B is same as SATA drive A

The set up as follows:
# mknod /dev/md1 b 9 1
# mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb1
# mdadm --create /dev/md1 --level=1 --raid-devices=2 missing /dev/sdb5
# mdadm --examine --scan >> /etc/mdadm.conf

- The output /proc/mdsdtat is normal

# mkreiserfs /dev/md0
# mkreiserfs /dev/md1
# mkdir /mnt/md0
# mkdir /mnt/md1
# mount /dev/md0 /mnt/md0
# mount /dev/md1 /mnt/md1
# cp -ax /boot /mnt/md0
# cp -ax / /mnt/md1

- 2 lines below were added to /etc/fstab (on SATA drive A)
/dev/md0 /mnt/md0 reiserfs defaults 0 0
/dev/md1 /mnt/md1 reiserfs defaults 0 0

- reboot the machine

- when I type mount, the /dev/md0 is currently mounted but /dev/md1 was not mounted.
- An error message 'mount: special device /dev/md1 does not exist' during machine boot


- anything wrong in my set up ?
- I create /dev/md1 with mknod and this md devices was disappear after reboot. Is there a way that I can fix it?
- I want to mirror all the partitions for SATA drive A after the /dev/md0 and /dev/md1 are created successfully.
If I want to mirror all the partition for disk A, do I just create raid devices for all the
individual partitions i.e /dev/sda1 to /dev/sda10 except extended partition /dev/sda2 and the swap /dev/sda6?

Thanks in advance
Old 09-01-2005, 10:46 AM   #3
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
What does fstab look like and also what does cat /proc/mdstat say
Old 09-01-2005, 05:12 PM   #4
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
Why do you keep posting this? What exactly is your question?
Old 09-01-2005, 08:36 PM   #5
Registered: Sep 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Hi IronWalker,

The ftsab is as follows:

/dev/sda5 / resiserfs notail 1 1
/dev/sda1 /boot resiserfs notail 1 2
/dev/sda9 /home resiserfs notail 1 2
/dev/hdd /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec,users 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-1,sync,codepage=850 0 0
/dev/sdb1 /mnt/hd auto umask=0,user,iocharset=iso8859-1,sync,kudzu,codepage=850,noauto,exec,users 0 0
none /proc proc defaults 0 0
/dev/sda10 /tmp reiserfs notail 1 2
/dev/sda7 /usr reiserfs notail 1 2
/dev/sda8 /var reiserfs notail 1 2
/dev/sda6 swap swap defaults 0 0
/dev/sdb10 /mnt/hd2 auto umask=0,user,isocharset=iso8859-1,sync,kudzu,codepage=850,noauto,exec,usres 0 0
/dev/md0 /mnt/md0 reiserfs defaults 0 0
/dev/md1 /mnt/md1 reiserfs defaults 0 0

The results for cat /proc/mdstat is as follows:
Personalities : [rais1]
mod0 : active raid1 sdb1[1]
811136 blocks [2/1] [_U]
Old 09-01-2005, 08:41 PM   #6
Registered: Sep 2003
Posts: 76

Original Poster
Rep: Reputation: 15
Hi bosewicht,

The first incomplete thread was submitted by mistake. Sorry for the multiple submission.
The question was stated in the second thread.
Old 02-07-2006, 05:26 AM   #7
LQ Newbie
Registered: Feb 2006
Location: Wales
Distribution: Fedora, SuSE, CentOS, Ubuntu
Posts: 13

Rep: Reputation: 0
In case this is still open, all you need to do is set your partion types to FD (linux raid autodetect)

that way at boot, the /dev/md1 device will be picked up and mdadm will start the array as per /etc/mdadm.conf


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 03:35 PM
Mdadm Raid question stefaandk Linux - General 12 08-16-2005 02:11 AM
Mailing with MDADM RAID rootking Linux - Hardware 1 07-26-2005 04:47 PM
Software RAID with mdadm problems... robbow52 Debian 2 04-19-2004 07:06 PM
mdadm mail with software RAID brucehohl Linux - Software 1 12-20-2003 06:17 AM > Forums > Linux Forums > Linux - Newbie

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

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