Visit Jeremy's Blog.
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-19-2010, 09:23 AM   #1
LQ Newbie
Registered: Jul 2010
Posts: 22

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


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.


Last edited by RWTH; 08-19-2010 at 09:26 AM.
Old 08-21-2010, 08:49 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,565

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


to get them.
Old 08-22-2010, 04:54 PM   #3
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?


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

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