You are not logged in.

#1 2009-09-27 23:07:05

ixzus
Member
From: Barcelona (Spain)-Bristol (UK)
Registered: 2008-10-25
Posts: 26

UUID vs. Label

Hi Archers, there is something I'm curious about.

I know UUID is used for persistent device naming, and so could labels be used for that purpose.
UUIDs are assigned automatically by the system but they are not really user friendly, labels are friendlier but you have have to asign them yourself.
I was just wondering whether there is any reason why one is better/prefered over the other, or if it really doens't ake any difference.
Oh and by the way, I have read the wiki entry on naming devices persistently. but anyway I'd like to know your point of view on this.

Thank you.


"If at first an idea is not absurd, then there is no hope for it."  A. Einstein

Offline

#2 2009-09-27 23:36:00

stefanwilkens
Member
From: Enschede, the Netherlands
Registered: 2008-12-10
Posts: 624

Re: UUID vs. Label

labels can be mistakenly edited during operation, UUID are (as you've said) assigned automatically and will only ever change if you change the partitioning of the hard drive.

I suppose through this, UUID is less likely to foobar?


Arch i686 on Phenom X4 | GTX760

Offline

#3 2009-09-28 14:41:45

ixzus
Member
From: Barcelona (Spain)-Bristol (UK)
Registered: 2008-10-25
Posts: 26

Re: UUID vs. Label

thanks

I normally prefer labels over uuids just because of readability.
I can see that one can make mistakes when assigning a label, but if that is the only problem, I guess I'll have to be carefull when adding labels to the partitions.
Is there any other reason?


"If at first an idea is not absurd, then there is no hope for it."  A. Einstein

Offline

#4 2009-11-02 03:23:44

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: UUID vs. Label

I prefer labels because they are easier to identify, and they've been working pretty well so see no reason to go uuid.


oz

Offline

#5 2009-11-02 11:56:55

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: UUID vs. Label

ixzus wrote:

thanks

I normally prefer labels over uuids just because of readability.
I can see that one can make mistakes when assigning a label, but if that is the only problem, I guess I'll have to be carefull when adding labels to the partitions.
Is there any other reason?

Yeah, I do too.  When I used Fedora, I was pleasantly surprised that it assigned both menu.lst and my fstab as labels.  I looked into this a bit and there was a device node for it '/dev/label' or 'dev/LABEL' I'm not sure which.  For Arch there is no such device node.  When I tried to find out why I didn't get much information except from some old mailing lists.  I'm not sure if this is a kernel option or if it is a userspace tool, but since it was in Grub I'm guessing it was kernel.  I've done kernel configurations in the past though and never seen this opton, but perhaps I missed it.  I too like the idea of labels because I tend to resize my partitions from time to time.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#6 2009-11-02 12:07:32

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: UUID vs. Label

I use labels because they offer a unique and unmistakable identification of partitions. If I e.g. need to do something on my machine from a live disc, I mount my partitions through the nodes in /dev/disk/by-label/ and I never pick the wrong partition. It also makes menu.lst and fstab and such transparant, with UUIDs you'd have to compare every line with the output of blkid to be sure it refers to the right partition.

Offline

#7 2009-11-02 12:10:03

kourosh
Member
From: England
Registered: 2009-03-10
Posts: 241
Website

Re: UUID vs. Label

Surely if you had a partition with the same label as say, a removable device, the system would get confused (automounting etc.)?

I switched to UUID for internal partitions when I reinstalled Arch, initial effort, and /etc/fstab looks disgusting, but it works perfectly.

EDIT. Though whenever I manually mount things, I use the original device naming, i.e. /dev/sda1 etc. after checking the output of dmesg, suppose checking the labels would work, im suprised i hadnt thought of that :S

Last edited by kourosh (2009-11-02 12:13:58)

Offline

#8 2009-11-02 13:58:10

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: UUID vs. Label

Ah, guess it was one of those times my search just turned up only old information (or perhaps just not many people don't do this).  Good to know this is possible though because it works better for me.  Just FYi to any that want to try it: don't use spaces in labels.  menu.lst and fstab entry:

kernel /boot/vmlinuz26 root=/dev/disk/by-label/Arch_Linux ro vga=0x365

LABEL=Arch_Linux        /           ext4    defaults,noatime        0      1

Arch_Linux == Arch_Linux


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#9 2009-11-02 14:25:02

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: UUID vs. Label

I prefer labels, because (a) they remind me what a partition stands for (e.g. arch64var, lenny32root, shareddata etc) and (b) with labels I have a natural mount point, namely /media/<label>. So I can define a command alias for
mount /dev/disk/by-label/${1} /media/${1}.
So the advantage is not so much for the partitions that are part of the currently running os, but for the other ones.


Good ideas do not need lots of lies told about them in order to gain public acceptance.

Offline

#10 2009-11-02 19:17:00

AaronD
Member
From: Tosev 3
Registered: 2009-01-27
Posts: 29

Re: UUID vs. Label

I like good old fashioned hdx or sdx.  It's simple, straight forward, and speaks to my Amiga roots (dfx for floppies, dhx for hard drives).


--Aaron

Offline

Board footer

Powered by FluxBB