LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-19-2010, 08:23 AM   #1
RWTH
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Rep: Reputation: 0
How to create RAID1 array with given/fix HD labels


Hi,

I have two HDs (let's say sda and sdb). Both are the same size and have the same partitions already (sda1/sda2/sda3 and sdb1/sdb2/sdb3). Basically they are ready to make a RAID1 array.

Writing with new udev rules, I could create and give fix HD labels with /sbin/scsi_id.

Example: For sdb1 I have a fix device name created under /dev as hd2_boot1, for sdb2 I have /dev/hd2_boot2 and finally for sdb3 I have created the device /dev/hd2_boot3.

With using the command "mdadm --create /dev/md0 --level=1 ....", I could create a RAID array.

But, when I check the status one of the RAID devices, like with the command "mdadm --detail /dev/md2", it still shows me as part of the RAID array the sdb* devices, not the hd2_boot* devices. Something like this:

"1 8 19 1 active sync /dev/sdb3"

I would like to see basically as member or the RAID array always the /dev/hd2_boot3 not the /dev/sdb3 (like above), is this possible?

Bottom line, I would like to keep the order of the RAID arrays depending their scsi ids, not depending their scsi numberings which is given by the kernel, since the scsi numberings (sda, sdb, sdc and etc.) can change depending the physical connection.

Thanks,
RWTH

Last edited by RWTH; 08-19-2010 at 08:26 AM.
 
Old 08-21-2010, 07:49 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Try using the UUIDs; login as root and type

blkid

to get them.
 
Old 08-22-2010, 03:54 PM   #3
RWTH
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Hi chrism01,

I got the UUIDs of each individual drive partition and the md devices. It is interesting, that the each partition of the same HD has different UUID, why is that? Since each partition belong to the sama HD, shouldn't all the partitions on the same HD have the same UUID?

Also, after getting the UUIDs, how should I proceed, in order to create the RAID1 array devices, like I described above?
 
  


Reply



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
Moving RAID1 array to fresh OS installation? HighLife Linux - Newbie 7 10-30-2008 05:06 PM
RAID1 array rebuild fails at 99.9% recovery apomatix Linux - Hardware 3 06-06-2008 06:30 AM
add a new disk to raid1 array retrev Linux - General 1 04-08-2007 01:57 AM
rebuilding a drive kicked from RAID1 array ocularbob Linux - Software 1 02-12-2007 10:12 PM
I don't think I crated a Raid1 array Jan Tanjo Linux - General 5 10-27-2006 08:17 AM

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

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