You are not logged in.

#1 2009-10-27 21:51:46

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Uuid,label,raid

Perhaps this post is not new per se, but I raise a question regarding the use of uuid or label and their relationship to mdadm raid.

Additionally, if one uses LABEL for one drive, can UUID be used for another?

It seems obvious that drives in mdadm require identical UUID's in order that they be properly assembled via mkinitcpio initramfs through /etc/mdadm.conf.  It is not apparent that drives listed with LABEL can also be assembled in like manner (not having seen such in evidence to date), thus it leaves this user with a question as to whether they will assemble with that method.

If the user chooses LABEL for the raid devices only, does the system override such a designation and make all drives UUID anyway? (The raid designator is some form of md(x) and has no  uuid, being listed as md(x) in fstab).

One last question, the term LABEL is not apparent to this user...is it to be a general term for the name the user uses for a label?  Is it possible to generate a LABEL that is not allowed?

Every change in archlinux procedures makes one a "noobie".

Hoping for answers..........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#2 2009-11-01 22:54:35

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Uuid,label,raid

lilsirecho wrote:

Perhaps this post is not new per se, but I raise a question regarding the use of uuid or label and their relationship to mdadm raid.

I don't think they're called labels as such for RAID arrays. Filesystems can have labels (e.g. the sort you would assign to an ext2/3 filesystem with "tune2fs -L"), but that's one level above RAID. The RAID array can have a "name," though* (which you specify with the "--name" switch when you're building the array with mdadm). So, you could have a RAID array called "bob" with a filesystem called "roger" on it...

lilsirecho wrote:

Additionally, if one uses LABEL for one drive, can UUID be used for another?

No reason why you couldn't, though I'm not sure why you'd want to. All of your RAID arrays automatically have UUID's, but only the ones you gave names to will have names.

Offline

#3 2009-11-02 02:25:15

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: Uuid,label,raid

Appreciate the response....

As the mdadm man pages present, the --name parameter is only available in the mdadm version-1.

AFAICT the version in archlinux is 0.9.  Some of the remarks in mdadm do not link --name to the required version...some do.

It does seem that the uuid is the method used by mdadm for raid devices but it isn't stated outright that I can see altho all my arrays do have uuid for the elements.

The array formed from the uuid devices does not have a uuid but usually is identified as md(x).

It would seem therefore that LABEL is inconsistent with mdadm raid systems, as you point out.

This consideration may not cover device-mapper raid systems which I haven't recently tried.

I close on this remark.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#4 2009-11-02 06:49:25

thetrivialstuff
Member
Registered: 2006-05-10
Posts: 191

Re: Uuid,label,raid

lilsirecho wrote:

As the mdadm man pages present, the --name parameter is only available in the mdadm version-1.

AFAICT the version in archlinux is 0.9.

0.9 is the default superblock version that mdadm will create; I think you can tell it to create a version 1 superblock with the -e switch. The 0.9 default is just there for compatibility (in case you move the disks into an older system or something). So if you do something like:

mdadm --create /dev/md0 -e1.2 -l 1 -n 2 --name=my_array /dev/sda1 /dev/sdb1

You would get a RAID-1 array of sda1 and sdb1 with version 1.2 superblock and the name "my_array" on it, and you could later assemble it with "mdadm --assemble --name=my_array" (I think).

My RAID-1 arrays do seem to have UUID's for their assembled state:

$ blkid
/dev/sda1: UUID="1beb1eea-ccc1-cdd6-6680-1df6d514f1f3" TYPE="linux_raid_member" 
[snip; a bunch of other disks]
/dev/sdc1: UUID="1beb1eea-ccc1-cdd6-6680-1df6d514f1f3" TYPE="linux_raid_member" 
/dev/md0: UUID="43f09261-70ab-43df-ab49-92b355ea41f1" SEC_TYPE="ext2" TYPE="ext3"

$ ls -l /dev/disk/by-uuid/43f*
lrwxrwxrwx 1 root root  9 2009-11-01 16:33 43f09261-70ab-43df-ab49-92b355ea41f1 -> ../../md0

(md0 is a mirrored set of sda1 and sdc1)

...so presumably I could put that in fstab by UUID if I wanted to (I actually don't like UUID's for a bunch of complicated reasons but that's neither here nor there :P ).

Offline

#5 2009-11-02 06:57:39

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Uuid,label,raid

Moved out of Off-topic.


(never thought I'd have to do that here... smile )

Offline

Board footer

Powered by FluxBB