You are not logged in.

#1 2024-08-30 14:27:43

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 245
Website

[SOLVED] BTRFS UUID: some confusion

I am confused about which UUID is correct for my BTRFS subvolumes. Various commands don't return the same number.

# btrfs subvolume list -u /
[sudo] password for gabx: 
ID 256 gen 51184 top level 5 uuid 48dab75c-07b7-5343-af71-c0c2ed57486a path @
ID 257 gen 51185 top level 5 uuid a38aca56-6d40-6445-a93b-06d7174c6727 path @home
ID 258 gen 51180 top level 5 uuid ae9f1507-342f-6c47-becf-43ae3a3ce0fd path @tmp
ID 259 gen 51185 top level 5 uuid 109eef71-adde-fe43-8f32-6d6ebf8c4d9a path @log
ID 260 gen 50666 top level 5 uuid a2941178-124a-654d-81b2-ed3b186fb0b2 path @pkg
ID 261 gen 45706 top level 5 uuid 6c41f54f-995d-d649-953a-b213f725e07a path @docker
ID 264 gen 20 top level 256 uuid 828dcbd3-3547-c743-9195-8ef9aba03ca8 path var/lib/portables
ID 265 gen 20 top level 256 uuid 17f37351-b7e2-ee43-a52b-f3d1ff44f8b3 path var/lib/machines
ID 272 gen 46259 top level 5 uuid d03e47b5-3814-db4e-a428-a176ea5a1746 path @development

------------------------------------------------------------------------

We can see below there is one only UUID number for my BTRFS partition. No UUID for the subvolumes
% blkid
/dev/nvme0n1p1: UUID="E63C-425B" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="66f4843a-47c7-43cf-9cdf-1011cb60b1c3"
/dev/nvme0n1p2: LABEL="Magnolia" UUID="6ca0f63e-7327-444e-af89-ac82d08fda59" UUID_SUB="ed161102-2787-431a-93d9-79cfddfe3bcc" BLOCK_SIZE="4096" TYPE="btrfs" PARTUUID="f726ea05-4d7e-421f-afe6-b7c1bd2f93b1"

----------------

That's the way I mount my BTFR partition
% cat /etc/fstab
/dev/nvme0n1p2 LABEL=Magnolia
UUID=6ca0f63e-7327-444e-af89-ac82d08fda59	/         	btrfs     	rw,noatime,ssd,discard,space_cache=v2,subvol=/@	0 0

It looks to me that UUID returned by the btrfs subvolume list command are something like sub-UUID.
Can someone explain to me where the difference is?

Last edited by gabx (2024-08-31 16:05:23)

Offline

#2 2024-08-30 17:10:43

mpan
Member
Registered: 2012-08-01
Posts: 1,597
Website

Re: [SOLVED] BTRFS UUID: some confusion

`btrfs subvolume list` doesn’t list the top-level subvolume (id=5).

Last edited by mpan (2024-08-30 17:11:03)


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#3 2024-08-30 17:32:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] BTRFS UUID: some confusion

gabx wrote:

I am confused about which UUID is correct for my BTRFS subvolumes

There are several UUIDs: the partition, the filesystem and the subvolumes all have their own.

Why are you interested in the UUIDs? What problem are you trying to solve?


Jin, Jîyan, Azadî

Offline

#4 2024-08-30 23:51:06

mpan
Member
Registered: 2012-08-01
Posts: 1,597
Website

Re: [SOLVED] BTRFS UUID: some confusion

Head_on_a_Stick: see their “Magnolia” mount, compare with `btrfs subvolume list` output. See where the confusion may come from?


Paperclips in avatars? | Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2024-08-31 16:05:01

gabx
Member
From: Geneva, Switzerland
Registered: 2011-11-20
Posts: 245
Website

Re: [SOLVED] BTRFS UUID: some confusion

Head_on_a_Stick wrote:

There are several UUIDs: the partition, the filesystem and the subvolumes all have their own.

Why are you interested in the UUIDs? What problem are you trying to solve?

Nothing very special, just wanted to be sure there were several UUIDS.

Offline

Board footer

Powered by FluxBB