LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 11-20-2010, 07:02 AM   #1
djspits
LQ Newbie
 
Registered: Oct 2009
Location: The Hague, The Netherlands
Distribution: Ubuntu 10.04 LTS
Posts: 15

Rep: Reputation: 0
A HowTo example I don't understand


The RAID1+LVM HowTo shows how to create an array as follows

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 missing
mdadm --manage --add /dev/md0 /dev/sdc1

in stead of (what I would expect)

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda1 /dev/sdc1

Would someone explain the difference?

Regards,
DJ
 
Old 11-20-2010, 09:30 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
two steps instead of one?

I don't immediately understand why they would want to create a two-disk raid1 with a missing member and then add the 2nd member (sdc1) after, when you can do it all in a single step. Either way it will synch...
 
Old 11-20-2010, 11:23 AM   #3
VaZso
Member
 
Registered: May 2008
Location: Hungary
Distribution: Debian
Posts: 46

Rep: Reputation: 0
I think you can create a raid array with a missing unit, copy the data to the disk and see everything works well, then add the second disk to the array if there weren't any problems...
 
Old 11-20-2010, 11:56 AM   #4
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
If you are configuring RAID on a pre-existing machine, you want to ensure that you don't loose your data, therefore it makes sense to create the raid set with one disk, copy the data and then add the second disk to the raid set.

But I would have thought that the initial install would be using /dev/sda rather than /dev/sdc

I have never had much luck with software raid personally and always prefer to use hardware raid where possible
 
Old 11-20-2010, 05:12 PM   #5
djspits
LQ Newbie
 
Registered: Oct 2009
Location: The Hague, The Netherlands
Distribution: Ubuntu 10.04 LTS
Posts: 15

Original Poster
Rep: Reputation: 0
Ahhh, could it be that this way you determine the direction of the sync? Always from existing --> added? You wouldn't need to manually copy and you wouldn't run the risk of the array "syncing" an empty disk over your precious data.

That's my hypothesis for now.

Regards,
DJ
 
Old 11-21-2010, 03:09 AM   #6
Disillusionist
Senior Member
 
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
No, you cannot create an array with a mounted volume (to prevent accidental data loss)

Therefore if your machine has two drives, and you want to have a RAID 1 setup, you first create the raid on the unmounted (presumably empty) disk, then copy the data to the RAID disk, then change the fstab entries to use the raid set remount the / partition and add the original disk to the raid set.

I would always suggest trying this out on a testlan before doing this in a production environment (and always have a backup before you start)
 
1 members found this post helpful.
  


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
Don't understand howto use mirrordir or rdiff-backup with ssh spaceuser Linux - Newbie 0 08-16-2008 12:55 AM
Don't Understand melp57 Linux - Newbie 6 11-13-2007 07:14 PM
Linux Multicasting HOWTO.HOWTO Join Multicast Groups ar24458 Linux - Networking 0 04-02-2007 01:55 AM
can't understand bondoq Linux - Security 1 11-27-2006 06:40 AM
Howto update KDE and howto switch off kdm/gdm Canaris Linux - Software 1 06-15-2003 08:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration