Is this generated fstab line correct? seems wrong to me

I just stumbled upon my arch generated fstab. All the btrfs subvol entries are starting with a leading slash in the subvolume name. This doesn’t look correct to me, but im unsure about it.

The system is working well, I guess because the subvolid is also given in the fstab file and the subvolume gets mountet by the id not by it’s name.

Is it safe to remove the leading slash? i.e. subvol=/@ to subvol=@

All this repeats with any other subvolume in the fstab, generated while installing Arch.

LABEL=ROOTFS       /       btrfs       rw,noatime,compress=zstd:3,ssd,space_cache=v2,commit=120,subvolid=256,subvol=/@       0 0


It makes no difference. It works fine with or without the /.

If you ever want to use btrfs snapshots to restore a subvolume, this will be a big problem. You should remove the subvolid= part here. It isn’t needed and can cause issues during a restore.

This is caused by using the results from mount to build your fstab which produces questionable results when using btrfs.


Thanks a lot for your advice. I removed all the “subvolid=X” entries and I also removed the leading slashes.

The live system boots up correctly, and the taken snapshots, that are bootet from systemd-boot, are functional, as well.

I’m editing the fstab file inside the snapshots via automated script, so that the root volume entry points to the correct snapshot.

1 Like

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