Btrs-assistant in triple-boot only Debian-Sid shows subvolumes in select target

Good morning,

I have a triple-boot installation (mint, debian_sid, endevour) with btrfs-assistant installed on each of them… The idea is that if a distro is broken, I can restore the snapshot from any of the other distros…

In btrfs-assistant, in the ‘browse’ tab and the ‘select target’ drop-down menu I can only see the root partitions @ (mint) @sid and @endeavour respectively under the sid distro, on the others I can’t see them.

I’ve compared my fstab, snapper config file, sub-volume layout for each working distro, but I can’t find any explanation. I’m wondering if it’s not because of the version of Brtrfs-assistant installed. The most recent version of endeavour should work fine, but I can’t see anything in the select target drop-down menu.

I’m posting my various fstab, layout and snapper config files, and the version of btrfs-assistant used on each distro, if anyone could find the typo.

Edit : I will send you the conf files later

I would need to see your list of subvolumes to understand your layout.

@dalto

here’s the rest, I’ve slept in the meantime :wink:

Layout viewed from Mint (root under @)

ID 264 gen 8455 top level 5 path @home_endeavour
ID 265 gen 8455 top level 5 path @log_endeavour
ID 266 gen 8455 top level 5 path @cache_endeavour
ID 267 gen 6113 top level 5 path @donnees_bkp
ID 268 gen 934 top level 403 path @endeavour/var/lib/portables
ID 269 gen 934 top level 403 path @endeavour/var/lib/machines
ID 271 gen 9105 top level 5 path @home
ID 272 gen 9096 top level 5 path @cache_mint
ID 273 gen 9105 top level 5 path @log_mint
ID 275 gen 8849 top level 5 path @home_sid
ID 276 gen 8849 top level 5 path @log_sid
ID 277 gen 8849 top level 5 path @cache_sid
ID 284 gen 8802 top level 403 path @endeavour/.snapshots
ID 286 gen 8680 top level 398 path @sid/.snapshots
ID 291 gen 8787 top level 374 path .snapshots
ID 374 gen 9105 top level 5 path @
ID 398 gen 8849 top level 5 path @sid
ID 403 gen 8455 top level 5 path @endeavour
ID 408 gen 9105 top level 5 path @donnees

Layout viewed from Sid

ID 264 gen 8455 top level 5 path @home_endeavour
ID 265 gen 8455 top level 5 path @log_endeavour
ID 266 gen 8455 top level 5 path @cache_endeavour
ID 268 gen 934 top level 403 path @endeavour/var/lib/portables
ID 269 gen 934 top level 403 path @endeavour/var/lib/machines
ID 271 gen 8490 top level 5 path @home
ID 272 gen 8490 top level 5 path @cache_mint
ID 273 gen 8490 top level 5 path @log_mint
ID 275 gen 8665 top level 5 path @home_sid
ID 276 gen 8665 top level 5 path @log_sid
ID 277 gen 8645 top level 5 path @cache_sid
ID 284 gen 8443 top level 403 path @endeavour/.snapshots
ID 286 gen 8472 top level 398 path .snapshots
ID 291 gen 8486 top level 374 path @/.snapshots
ID 374 gen 8491 top level 5 path @
ID 398 gen 8665 top level 5 path @sid
ID 403 gen 8455 top level 5 path @endeavour
ID 408 gen 8665 top level 5 path @donnees

Layout viewed from Endeavour

ID 264 gen 9151 top level 5 path @home_endeavour
ID 265 gen 9151 top level 5 path @log_endeavour
ID 266 gen 9131 top level 5 path @cache_endeavour
ID 267 gen 6113 top level 5 path @donnees_bkp
ID 268 gen 934 top level 403 path var/lib/portables
ID 269 gen 934 top level 403 path var/lib/machines
ID 271 gen 9121 top level 5 path @home
ID 272 gen 9121 top level 5 path @cache_mint
ID 273 gen 9121 top level 5 path @log_mint
ID 275 gen 9127 top level 5 path @home_sid
ID 276 gen 9127 top level 5 path @log_sid
ID 277 gen 9126 top level 5 path @cache_sid
ID 284 gen 8802 top level 403 path .snapshots
ID 286 gen 8680 top level 398 path @sid/.snapshots
ID 291 gen 8787 top level 374 path @/.snapshots
ID 374 gen 9121 top level 5 path @
ID 398 gen 9127 top level 5 path @sid
ID 403 gen 9151 top level 5 path @endeavour
ID 408 gen 9147 top level 5 path @donnees

installed version of btrfs-assistant are

under Mint :

btrfs-assistant:
Installé : 1.8-1+3.1
Candidat : 1.8-1+3.1
Table de version :
*** 1.8-1+3.1 100
100 /var/lib/dpkg/status

under Sid :

which is the only which shows the subvolumes off all distros) under the Browse/restore and select target) .

root@falke-netbook:/etc# sudo apt policy btrfs-assistant
btrfs-assistant:
Installé : 1.8-1+b1
Candidat : 1.8-1+b1

Under Endeavour :

falke@falke-macbookair72 Bureau]$ yay -Qi btrfs-assistant
Nom : btrfs-assistant
Version : 2.1.1-1

==> I have the impression that this is linked to the different versions of btrfs-assistant

I have noted that the sub-volumes to be restored are only visible (for all the distros) if at least one snapshot has been taken for each of them :wink: I’ve removed them from my layouts to make my conf more readable for you

if you want, I can also attach a copy of /etc/fstab and the snapper configuration files.

In the screenshot we can see that btrfs-assistant is only showing de root subvols of each distros on the Debian Sid version , other btrfs-assistant version won’t …

OK, I finally solved the problem on the other two distros (mint and eos).

the problem seems to come from my fstabs on mint and eos :

on both the mint and eos distros, I had these two uncommented lines.

UUID=d80981ac-56fb-4c4d-ac42-01e566f6ffc7 /mnt btrfs defaults 0 0

and

UUID=d80981ac-56fb-4c4d-ac42-01e566f6ffc7 /mnt/btr_pool btrfs defaults,noatime,compress=zstd 0 0

I commented on the second one (used for mounting btrbk backups), saying to myself that if the first one is mounted, we’re bound to see the btr_pool directory too, and brtfs-assistant showed me the sub-volumes (@ , @mint, @endevour) in the restore tab, on the two other distros.

I don’t understand what /etc/fstab has to do with btrfs-assistant.

What’s more, apart from being able to display subvolumes with the btrfs subvolume list / command, I’m not even sure that btrfs-assistant can’t work without mounting the physical partition under /mnt…

@dalto, I’d be very interested in your analysis.

I’m not even sure that btrfs-assistant can’t work without mounting the physical partition under /mnt…

it can work without these mount point BUT brtbk needs at least that the physical partition
to be mounted under /mnt/btrpool in order to work…

UUID=d80981ac-56fb-4c4d-ac42-01e566f6ffc7 /mnt/btr_pool btrfs defaults,noatime,compress=zstd 0 0

so, the only remaining question is how fstab interacts with btrfs -assistant, @dalto any idea ?

This is a pretty strange thing to do. You have mounted the same thing at both /mnt and /mnt/btr_pool. You have mounted the root inside itself. In other words, with this setup ls /mnt and ls /mnt/btr_pool will provide the same results.

I am not sure what you were trying to do there but I am pretty sure that isn’t what you want.

What you should have in /etc/fstab for btrbk is this:

UUID=d80981ac-56fb-4c4d-ac42-01e566f6ffc7  /mnt/btr_pool  btrfs  subvolid=5,noatime  0 0

If you only had that line and not the /mnt line it should work fine.

In general, Btrfs Assistant doesn’t care where you mount things. There are no fixed mount points required.

I would have to do some testing but I suspect you found an obscure bug caused by mounting the root of your btrfs partition inside itself.

Btrbk can use a subvolume which has been mounted anywhere you like, and it can have any name you like as well. It doesn’t have to be mounted at mnt/btr_pool, that is just an example they give in the documentation.

It is recommended to use a top-level subvolume if you want to use it to take snapshots of /, but even that is not a hard requirement since v0.32.0 (over two years ago).

https://github.com/digint/btrbk?tab=readme-ov-file#configuration

Mounting subvolid=5 is recommended (mandatory for btrbk < v0.32.0) if you want to backup your root filesystem /.

/etc/fstab:

/dev/sda1  /mnt/btr_pool  btrfs  subvolid=5,noatime  0 0

If you want to use a different mount point than that, just be sure to change the snapshot_dir target in your Btrbk config to match.

You don’t even need to mount your Btrbk directory on the filesystem root to use Btrbk, even though in the examples in the documentation that is how they explain to do it. Instead, you can just create a subvolume for it and add a mount option for the subvolume to fstab.

No matter how you set it up, the fstab entry you had which was mounting the filesystem root at /mnt should not be part of it.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.