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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-31-2005, 08:23 AM
|
#1
|
Member
Registered: Sep 2003
Posts: 76
Rep:
|
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
/dev/sda2
|
|
|
08-31-2005, 10:12 AM
|
#2
|
Member
Registered: Sep 2003
Posts: 76
Original Poster
Rep:
|
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
Questions:
- 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
|
|
|
09-01-2005, 10:46 AM
|
#3
|
Member
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 lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506
Rep:
|
What does fstab look like and also what does cat /proc/mdstat say
|
|
|
09-01-2005, 05:12 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381
Rep:
|
Why do you keep posting this? What exactly is your question?
|
|
|
09-01-2005, 08:36 PM
|
#5
|
Member
Registered: Sep 2003
Posts: 76
Original Poster
Rep:
|
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]
|
|
|
09-01-2005, 08:41 PM
|
#6
|
Member
Registered: Sep 2003
Posts: 76
Original Poster
Rep:
|
Hi bosewicht,
The first incomplete thread was submitted by mistake. Sorry for the multiple submission.
The question was stated in the second thread.
|
|
|
02-07-2006, 05:26 AM
|
#7
|
LQ Newbie
Registered: Feb 2006
Location: Wales
Distribution: Fedora, SuSE, CentOS, Ubuntu
Posts: 13
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 04:43 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|