You are not logged in.

#1 2013-06-12 10:27:34

x-yuri
Member
Registered: 2013-01-06
Posts: 161

[SOLVED] What is the difference between UUID and PARTUUID?

Wiki says:

Note: Please notice the difference between the standard UUID and the PARTUUID shown by $ ls -l /dev/disk/by-partuuid/

So what's the difference?

Last edited by x-yuri (2013-06-12 16:30:10)

Offline

#2 2013-06-12 10:33:50

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] What is the difference between UUID and PARTUUID?

PARTUUID/PARTLABEL identifies a GPT partition. UUID/LABEL identifies a filesystem.

PARTUUID/PARTLABEL have the advantage that they don't change if your reformat the partition with another filesystem. It's also useful if you don't have a filesystem on the partition (or use LUKS, which doesn't support LABELs).

Offline

#3 2013-06-12 10:44:54

x-yuri
Member
Registered: 2013-01-06
Posts: 161

Re: [SOLVED] What is the difference between UUID and PARTUUID?

And UUID/LABEL are stored inside partitions, as opposed to PARTUUID/PARTLABEL, right? Come to think of it, do windows partitions have UUID too?

Offline

#4 2013-06-12 10:51:49

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] What is the difference between UUID and PARTUUID?

x-yuri wrote:

And UUID/LABEL are stored inside partitions, as opposed to PARTUUID/PARTLABEL, right? Come to think of it, do windows partitions have UUID too?

UUID/LABEL are part of the filesystem, so I guess you could say they are stored inside the partition, yes.

NTFS and FAT32 partitions have UUIDs as well (although they are much shorter).

Offline

#5 2013-06-12 13:19:14

x-yuri
Member
Registered: 2013-01-06
Posts: 161

Re: [SOLVED] What is the difference between UUID and PARTUUID?

It appears FAT's and NTFS's UUIDs are not true UUIDs, whatever it means :)

All Linux filesystems support filesystem UUIDs; FAT and NTFS filesystems don't support true UUIDs, but are still listed in /dev/disk/by-uuid with a unique identifier

http://wiki.debian.org/Part-UUID#Via_UUIDs

Also, I'm trying to comprehend how LVM and LUKS fit into the picture... As far as I can tell, they are not filesystems, like ext4 or ntfs. They are transparent containers. The data itself are stored inside these containers. Containers are basically responsible for knowing how to get the data. Therefore, how come LUKS can support LABELs? I thought LABELs are part of a filesystem, aren't they?

Last edited by x-yuri (2013-06-12 13:20:29)

Offline

#6 2013-06-12 13:30:16

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] What is the difference between UUID and PARTUUID?

x-yuri wrote:

Also, I'm trying to comprehend how LVM and LUKS fit into the picture... As far as I can tell, they are not filesystems, like ext4 or ntfs. They are transparent containers. The data itself are stored inside these containers. Containers are basically responsible for knowing how to get the data. Therefore, how come LUKS can support LABELs? I thought LABELs are part of a filesystem, aren't they?

As I said, LUKS does not support LABELs. It does however support UUIDs which are probably just stored in the LUKS header (see cryptsetup luksDump).

no idea about LVM.

Offline

#7 2013-06-12 13:42:50

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] What is the difference between UUID and PARTUUID?

LVM pvs have headers, not sure about vgs and lvs though.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#8 2013-06-12 16:29:07

x-yuri
Member
Registered: 2013-01-06
Posts: 161

Re: [SOLVED] What is the difference between UUID and PARTUUID?

Ok, let me tell you the picture the way I see it for now.

First, there are GPT and MBR, which define the format of the whole physical drive, except for partitions themselves. They may contain PARTUUIDs/LABELs. Then, there may be intermidiate levels like LVM or LUKS, which may have UUIDs/LABELs assigned to their "subpartitions". And finally there are filesystems, which may have UUIDs/LABELs.

Then, particularily, LUKS supports UUIDs, but doesn't support LABELs; all linux filesystems supports UUIDs; FAT and NTFS doesn't support true UUIDs, whatever it means (either they have some ids, or ids are somehow assigned by the kernel).

Offline

#9 2013-06-12 23:30:26

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,144

Re: [SOLVED] What is the difference between UUID and PARTUUID?

sda3 on my system has a UUID. This is LVM on LUKS. Each volume within the LVM then also has a UUID.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#10 2013-06-13 00:00:21

x-yuri
Member
Registered: 2013-01-06
Posts: 161

Re: [SOLVED] What is the difference between UUID and PARTUUID?

btw,

/dev/sda3: UUID="12nTBU-FlXK-QJcW-Nc2s-VSHl-Gke8-eshAkl" TYPE="LVM2_member" PARTLABEL="Linux LVM" PARTUUID="f023329c-d1b7-42a4-a1bf-9745ef2fbcea"
/dev/mapper/VolGroup00-lvolroot: UUID="9d3e54fe-57a9-4ac3-823b-5fcd2c4fc9f2" TYPE="ext4"

As such, one can't use PARTUUID for lvm volumes.

Offline

Board footer

Powered by FluxBB