I’m setting up a new server and wanted to use btrfs for the filesystem.
After anaconda completed I have this fstab:
UUID=5abde8a9-aba0-4f70-a877-3fcedd20905e / btrfs subvol=root,compress=zstd:1 0 0
UUID=a2073a14-3aa8-4da7-bb78-399cf64324aa /boot xfs defaults 0 0
UUID=C63A-112D /boot/efi vfat umask=0077,shortname=winnt 0 2
UUID=5abde8a9-aba0-4f70-a877-3fcedd20905e /home btrfs subvol=home,compress=zstd:1 0 0
UUID=5abde8a9-aba0-4f70-a877-3fcedd20905e /var btrfs subvol=var,compress=zstd:1 0 0
Now I want to add a new subvolume for use by samba.
It seems that this is the command to use:
btrfs subvolume create /shared
And I see the new subvol:
$ btrfs subvolume list /
ID 256 gen 1104 top level 5 path var
ID 257 gen 1104 top level 5 path root
ID 258 gen 1104 top level 5 path home
ID 259 gen 1104 top level 256 path var/lib/portables
ID 261 gen 1100 top level 257 path shared
I add this line to fstab:
UUID=5abde8a9-aba0-4f70-a877-3fcedd20905e /shared btrfs subvol=shared,compress=zstd:1 0 0
But I cannot mount subvol=shared as I’d expected to need to do:
$ mount /shared
mount: /shared: fsconfig system call failed: No such file or directory.
dmesg(1) may have more information after failed mount system call.
Reading the btrfs docs at btrfs-subvolume(8) — BTRFS documentation is not making the situation clear.
Here is the state of the subvols:
$ btrfs subvolume list /
ID 256 gen 1113 top level 5 path var
ID 257 gen 1112 top level 5 path root
ID 258 gen 1104 top level 5 path home
ID 259 gen 1104 top level 256 path var/lib/portables
ID 261 gen 1100 top level 257 path shared
Why does root, var and home need to be mounted by shared does not?
What is the significance of the level? Its 5 for the ones that need mounting.