You are not logged in.

#1 2022-03-04 00:50:03

benibilme
Member
Registered: 2020-06-03
Posts: 41

btfs on lvm/luks vs. btrfs on luks only, zfs?

Hello,

I am slowly migrating all my file systems to brtfs because snaphotting and snapper facilities.  I have already deployed two machines with btrfs on luks. In my setup, the disk has only two partitions. The first one is the /boot partition which is efi partition and unencryted as expected. The rest is the luks partition. My root file system is encrypted. I am not using multi storage device or any raid setup.

Traditionally I would be partition the drives, and separate swap, home etc. if I am  using  ext4 with lvm/luks. But because of btrfs, I did not do it and gave all the store space to btrfs that is available in full luks partition, thinking that btrfs already provides capabilities similar to lvm except simulating block devices.

I manage all these things which used to be partitions with btrfs subvolumes including swap. I am using a swap file in swap subvolume. I had to create a lot of subvolumes to prevent unnecessary snapshotting of various system directories. I have quite similar setup described in detail at https://www.jwillikers.com/btrfs-layout

However, I have started to regret using this setup for following reason. In the current state of btrfs, I can not control mount options of subvolumes in btrfs. All subvolumes automatically take the mount options of root volume. I need to use bunch of kvm/qemu virtual machines or docker images which normally placed under /var/lib. I often use vagrant which uses local directories in home folder. I want the images not to be compressed and not be copy on write etc.  Currently I can not achieve it full.  I have seen 

$ mv /path/to/dir /path/to/dir_old
$ mkdir /path/to/dir
$ chattr +C /path/to/dir
$ cp -a --reflink=never /path/to/dir_old/. /path/to/dir
$ rm -rf /path/to/dir_old

to prevent CoW, but the compression is still there and I hate to micro manage specific folders and think ahead.

My current plan to install lvm on luks  and create usual partitions with lvm, like swap, root, home etc. and additional partitions for things that must not be compressed and nodatacows. I will be still using btrfs in root and home where I need to snapshot, but I will use ext4/xfs for the partitions with virtualmachines, docker images, containers etc.

I would like know, your opinions or advises about btrfs on lvm on luks. Will I be over killing, losing performance or increasing complexty in the event of disaster etc. I will have to manage multiple filesystem with this setup.

Is there a better way to tackle this problem. What will be advantages and disadvantages? I have spent a lot of time time to set up current btrfs installed machines, learning btrfs and dealing with its idiosyncrasies of it.  I really do not want to repeat it, however btrfs inability of seperate mount options of subvolumes makes me  hate btrfs. I am still committed to using btrfs file system because of using rolling distribution.
I have been bitten several times with updates in the past, and stuck for a while so I really would like to keep this setup.

As a side note, I really wanted to zfs instead of btrfs in the beginning, however being a newbie I found dealing with separate kernel and tracking it seperately made me scare.

I really appreciate any input.

Thank in advance

Last edited by benibilme (2022-03-04 01:00:52)

Offline

Board footer

Powered by FluxBB