Repository navigation
no recognition of proper btrfs layout when using labels in fstab #142
Copy link
Copy link
Open
Description
Describe the bug
timeshift doesn't recognize proper btrfs layout, if labels are used in fstab instead of UUIDs
To Reproduce
- setup Ubuntu 22.04 LTS with btrfs and configure the fstab with labels instead of uuids (see below)
- install timeshift
- configure timeshift (no error during configuration!)
- try to make your first snapshot
- => message indicating unsupported fs layout
doesn't work:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
LABEL=system / btrfs defaults,noatime,compress=zstd:3,subvol=@ 0 1
LABEL=boot /boot ext4 defaults 0 2
LABEL=ESP /boot/efi vfat umask=0077 0 1
LABEL=system /.swap btrfs defaults,noatime,subvol=@swap 0 2
/.swap/swapfile none swap defaults 0 0
LABEL=system /var/log btrfs defaults,noatime,compress=zstd:3,subvol=@log 0 2
LABEL=system /var/cache btrfs defaults,noatime,compress=zstd:3,subvol=@cache 0 2
LABEL=system /var/tmp btrfs defaults,noatime,compress=zstd:3,subvol=@tmp 0 2
LABEL=system /home btrfs defaults,noatime,compress=zstd:3,subvol=@home 0 2
does work:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 / btrfs defaults,noatime,compress=zstd:3,subvol=@ 0 1
UUID=3926c20d-4ef1-4448-ab29-5cd84e887994 /boot ext4 defaults 0 2
UUID=F999-ADE8 /boot/efi vfat umask=0077 0 1
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 /.swap btrfs defaults,noatime,subvol=@swap 0 2
/.swap/swapfile none swap defaults 0 0
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 /var/log btrfs defaults,noatime,compress=zstd:3,subvol=@log 0 2
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 /var/cache btrfs defaults,noatime,compress=zstd:3,subvol=@cache 0 2
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 /var/tmp btrfs defaults,noatime,compress=zstd:3,subvol=@tmp 0 2
UUID=6f975e3c-6fe5-4c5f-81d6-16df041b2a63 /home btrfs defaults,noatime,compress=zstd:3,subvol=@home 0 2
output of lsblk -o +LABEL /dev/mmcblk0
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS LABEL
mmcblk0 179:0 0 57,6G 0 disk
├─mmcblk0p1 179:1 0 524M 0 part /boot/efi ESP
├─mmcblk0p2 179:2 0 1,7G 0 part /boot boot
└─mmcblk0p3 179:3 0 55,4G 0 part cryptsystem
└─system 253:0 0 55,4G 0 crypt /run/timeshift/backup system
/var/tmp
/var/log
/var/cache
/.swap
/home
/var/snap/firefox/common/host-hunspell
/
Expected behavior
proper recognition of of btrfs layout no matter if UUID, LABEL, PARTLABEL, PARTUUID or /dev/[...] is used
System:
- Ubuntu 22.04 LTS
- Gnome 42.5
- Timeshift 21.09.1
Reacted by TAKAHASHI Shuuji and 依云
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]no recognition of proper fs layout when using labels in fstab[/-][+]no recognition of proper btrfs fs layout when using labels in fstab[/+][-]no recognition of proper btrfs fs layout when using labels in fstab[/-][+]no recognition of proper btrfs layout when using labels in fstab[/+]shuuji3 commentedon Sep 29, 2023
I also encountered the same issue when using
LABEL=for partitions, and It was difficult to spot the actual issue. I wanted to manage the partitions with LABEL since it's more human-readable.For reference, a similar issue was reported in the previous repository: teejee2008/timeshift#828.
DJCrashdummy commentedon Mar 30, 2026
just my 2 cents: you could use paths as a workaround for labels because they are also human readable and as long as you don't fiddle around with your hardware, they shouldn't change. ...and IIRC Timeshift should work fine with paths. 🤷
another option would be to still use UUIDs and simply add the Label at the end of each line as a comment. 😁
@RouL for a btrfs file system any value - except 0 - for
<pass>in the 6th column of the/etc/fstabmakes no sense.BTW: if this is your whole
/etc/fstab, i would use tmpfs for/tmpor at least a separate subvolume, to exclude it from the snapshots.RouL commentedon Apr 27, 2026
@DJCrashdummy Of course those are working temporary workarounds, but they really should stay temporary. 😁
About
<pass>: Didn't know that, good that you mention it, I'll fix it, when I'm at home and find the time. :)About
/tmp: Good catch. I believe, I did move it into a subvolume a while ago. But I'll check that, just to be sure.sklynic commentedon Oct 29, 2026
I'm using PARTUUIDs and just met this problem. Would love to see a better implementation on parsing fstab.
mskiptr commentedon Oct 29, 2026
Since this is the more canonical place for tracking this bug, I am re-posting this here: