Suppose I start with a non-btrfs system and then add a secondary drive that I format as btrfs. How would I mount /var/log on a subvolume of the new drive instead of on the original drive? Is this even possible?I've created the fs and the subvolume 'log' on it, but no syntax I try gets it to mount.
How do you mount a specific btrfs subvolume?
mount;fstab;btrfs
It turns out that you just have to specify the id of the subvolume. To find it, do# btrfs subvolume list <path to btrfs drive/fs>For fstab, the line will be very similar to the line for the btrfs drive in general, but with the subvolid option set. Mine looks like this since I'm using LVM:/dev/mapper/ubuntu--vg-vmdrive /mnt/vmdrive   btrfs    defaults 0 0/dev/mapper/ubuntu--vg-vmdrive /var/log       btrfs    defaults,compress=lzo,commit=120,subvolid=408 0       0Your subvolid will probably be different.Also, watch out for permission. As with any mount, you might need to set the uid/gid or umask, especially for something like /var/log.Hope this helps others.