Btrfs mode: struggling with compression by means of chattr +c

Hello,
I think that btrfs mode is not using compression in my instance of urbackup-server 2.0.32 on ubuntu 16.04. I would like to change that.

After perusing the administration guide
11.6.3 btrfs
11.7.2 Btrfs
and
https://btrfs.wiki.kernel.org

I can seed the my ubuntu 16.04 with kernel 4.4.0 is not yet configured to compress btrfs filesystem.
I probably overlooked it during the install phase because:
/etc/fstab shows only the following options
UUID=e73c8ee… / btrfs defaults,subvol=@ 0 1
# /home was on /dev/sda1 during installation
UUID=e73c8ee… /home btrfs defaults,subvol=@home 0 2

This installation is on a test hardware so I could experiment with the reinstallation of OS giving /var/urbackup a separate partition within /dev/sda.

But before I do that there are some options I could still explore.

  1. chattr -R +c /var/urbackup
  2. mount -o compression=lzo in fstab

So I did try chattr option and here is what I got:

chattr -R +c /var/urbackup
chattr: Operation not supported while reading flags on /var/urbackup/clients/acer-v11
chattr: Operation not supported while reading flags on /var/urbackup/acer-v11/160824-1910/Documents/My Music
chattr: Operation not supported while reading flags on /var/urbackup/acer-v11/160824-1910/Documents/My Pictures
chattr: Operation not supported while reading flags on /var/urbackup/acer-v11/160824-1910/Documents/My Videos
chattr: Operation not supported while reading flags on /var/urbackup/acer-v11/current

Question is: is this enough for btrfs mode in urbackup-serever to use compression?

regards
Lin

You’ll want to use the compress-force mount option instead of compress. Otherwise Btrfs uses a heuristic which often does not work to detect compressibility.

You can compress existing files via btrfs filesystem defragment -clzo -v -r /path.