LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-24-2010, 07:21 AM   #1
RWTH
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Rep: Reputation: 0
Fundamental RAID1 questions, which confuse me for a while!


Hi,

I have fundamental RAID1 questions, which confuse me for a while.

1) Once I want to built a RAID array with two HDs, then I create it with the following command:

"mdadm --create --verbose /dev/md0 --level=linear --raid-devices=2 /dev/sde1 /dev/sdf1".

With this command I specify the RAID array with the device labellings "sde1" and "sdf1", which are not the only HDs on the system. There are the other HDs sda, sdb, sdc and sdd.

Let's assume after a while I had to remove the HD sdc completely. Once I reboot the system, since there is one less HD, the labeling of the HDs could be shifted down, such that sde might become sdd and the sdf might become sde. In this case, how does the system take care about the RAID array?

Basically, how does the system know which fixed HDs are in the array and they are synced correctly, because sdf doesn't exist anymore and sde is changed to sdd?

2) Let's assume in a different scenario, that I have one HD in the system, namely the sda. There was no RAID array and therefor, I want to build a RAID array and bring the second HD sdb.

Once I build a RAID array with the following command:
"mdadm --create --verbose /dev/md0 --level=linear --raid-devices=2 /dev/sda1 /dev/sdb1".

What is the direction of the syncing for the data? How does the RAID array know, that the data on the sda1 has to be synced to sdb1. Other wise, if the RAID array syncs the data from sdb1 to sda1, then I will loose my useful/original data on sda1.

The same problem could occur also, when there is a HD failure. Once I take out the faulty HD and bring a new healthy HD, how does the RAID array know which way to sync (like in the above scenario)? May be in this last case, if I use the mdadm command with the "add" option and because of that the RAID array can distinguish the new HD from the old one.

Thanks,
RWTH
 
Old 08-24-2010, 01:04 PM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Quote:
how does the system take care about the RAID array?
Not sure but I think you have to delete your mdadm.conf file, re-assemble your array with something like "mdadm --assemble /dev/md0 /dev/sdd1 /dev/sde1" then re-create your mdadm.conf file. I don't think you're removing hd everyday? And if it's the case, maybe mdadm can handle partitions by their UUID like "mount" does? If so you have nothing to do.

And for your 2nd question, far to be sure too, but when using "mdadm --create", all devices used by the array need to be present, and you can add new device with "mdadm --add", so syncing goes from existing array to the device you've added. And so does work when replacing a failed hd.

Hope it helps
 
Old 08-25-2010, 03:23 AM   #3
RWTH
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jf.argentino View Post
Not sure but I think you have to delete your mdadm.conf file, re-assemble your array with something like "mdadm --assemble /dev/md0 /dev/sdd1 /dev/sde1" then re-create your mdadm.conf file. I don't think you're removing hd everyday? And if it's the case, maybe mdadm can handle partitions by their UUID like "mount" does? If so you have nothing to do.

And for your 2nd question, far to be sure too, but when using "mdadm --create", all devices used by the array need to be present, and you can add new device with "mdadm --add", so syncing goes from existing array to the device you've added. And so does work when replacing a failed hd.

Hope it helps
Thanks for your inputs jf.argentino
 
  


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
Have software raid1, but like to change to raid1+0 or 0+1, how? spaceuser Debian 8 03-17-2008 03:07 PM
A fundamental .... expatCM Linux - Server 3 06-09-2007 09:35 PM
SuSe 10 + GRUB + RAID1 questions TimBee SUSE / openSUSE 5 12-22-2005 07:23 AM
Fundamental Question in C and C++ linux_ub Programming 5 07-28-2004 12:26 PM
Partition fundamental questions jfchui Linux - Newbie 7 04-23-2004 07:47 AM


All times are GMT -5. The time now is 10:34 PM.

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