[opensuse] Trying to create a compressed (and encrypted) btrfs filesystem
Leap 15.0 /etc/fstab: /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zlib:1 1 3 This is per instructions on the wiki (and man): <https://btrfs.wiki.kernel.org/index.php/Compression> But yields error: Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /mnt/BookTelcontar: wrong fs type, bad option, bad superblock on /dev/mapper/cr_my_book_tlcntr, missing codepage or helper program, or other error. I have to use: /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress 1 3 which yields: mount: /dev/mapper/cr_my_book_tlcntr on /mnt/BookTelcontar type btrfs (rw,relatime,lazytime,compress=zlib,space_cache,subvolid=5,subvol=/) Is this a bug? Is the syntax different? man: compress, compress=type, compress-force, compress-force=type (default: off) Control BTRFS file data compression. Type may be specified as zlib, lzo, zstd or no (for no compression, used for remounting). If no type is specified, zlib is used. If compress-force is specified, then compression will always be attempted, but the data may end up uncompressed if the compression would make them larger. Otherwise some simple heuristics are applied to detect an incompressible file. If the first blocks written to a file are not compressible, the whole file is permanently marked to skip compression. As this is too simple, the compress-force is a workaround that will compress most of the files at the cost of some wasted CPU cycles on failed attempts. The heuristics of compress will improve in the future so this will not be necessary. Note If compression is enabled, nodatacow and nodatasum are disabled. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
W dniu 31.07.2019 o 19:31, Carlos E. R. pisze:
Leap 15.0
/etc/fstab:
/dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zlib:1 1 3
This is per instructions on the wiki (and man):
<https://btrfs.wiki.kernel.org/index.php/Compression>
But yields error:
Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /mnt/BookTelcontar: wrong fs type, bad option, bad superblock on /dev/mapper/cr_my_book_tlcntr, missing codepage or helper program, or other error.
I have to use:
/dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress 1 3
which yields:
mount: /dev/mapper/cr_my_book_tlcntr on /mnt/BookTelcontar type btrfs (rw,relatime,lazytime,compress=zlib,space_cache,subvolid=5,subvol=/)
Is this a bug? Is the syntax different?
man:
compress, compress=type, compress-force, compress-force=type (default: off)
Control BTRFS file data compression. Type may be specified as zlib, lzo, zstd or no (for no compression, used for remounting). If no type is specified, zlib is used. If compress-force is specified, then compression will always be attempted, but the data may end up uncompressed if the compression would make them larger.
Otherwise some simple heuristics are applied to detect an incompressible file. If the first blocks written to a file are not compressible, the whole file is permanently marked to skip compression. As this is too simple, the compress-force is a workaround that will compress most of the files at the cost of some wasted CPU cycles on failed attempts. The heuristics of compress will improve in the future so this will not be necessary.
Note If compression is enabled, nodatacow and nodatasum are disabled.
According to wiki page, that you linked: "The level support of ZLIB has been added in v4.14" Leap 15.0 (and 15.1) is using kernel 4.12. So for now you can only specify compression algorithm, without level.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El 2019-07-31 a las 22:05 +0200, Adam Mizerski escribió:
W dniu 31.07.2019 o 19:31, Carlos E. R. pisze:
Leap 15.0
/etc/fstab:
/dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zlib:1 1 3
man:
compress, compress=type, compress-force, compress-force=type (default: off)
...
According to wiki page, that you linked: "The level support of ZLIB has been added in v4.14"
I did not notice that. And I was not sure version of what.
Leap 15.0 (and 15.1) is using kernel 4.12.
So for now you can only specify compression algorithm, without level.
I can not specify algorithm, it does not accept anything. I tried that. - -- Cheers Carlos E. R. (from openSUSE 15.0 (Legolas)) -----BEGIN PGP SIGNATURE----- iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXUH3hBwccm9iaW4ubGlz dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVueoAoIOj7KOTCiGiLCLANLnv Jk+gjjOGAJkBZbRTD6ZM8VmDCs4mKg6xTmHFnA== =9dA/ -----END PGP SIGNATURE-----
On 31/07/2019 22.05, Adam Mizerski wrote:
According to wiki page, that you linked: "The level support of ZLIB has been added in v4.14"
Leap 15.0 (and 15.1) is using kernel 4.12.
So for now you can only specify compression algorithm, without level.
Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /mnt/BookTelcontar: wrong fs type, bad option, bad superblock on /dev/mapper/cr_my_book_tlcntr, missing codepage or helper program, or other error. Isengard:~ # grep BookTelcontar /etc/fstab /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zstd 1 3 Isengard:~ # Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /mnt/BookTelcontar: wrong fs type, bad option, bad superblock on /dev/mapper/cr_my_book_tlcntr, missing codepage or helper program, or other error. Isengard:~ # grep BookTelcontar /etc/fstab /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress:zstd 1 3 Isengard:~ # Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /dev/mapper/cr_my_book_tlcntr mounted on /mnt/BookTelcontar. Isengard:~ # grep BookTelcontar /etc/fstab /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zlib 1 3 Isengard:~ # Isengard:~ # umount /mnt/BookTelcontar Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /mnt/BookTelcontar: wrong fs type, bad option, bad superblock on /dev/mapper/cr_my_book_tlcntr, missing codepage or helper program, or other error. Isengard:~ # grep BookTelcontar /etc/fstab /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress=zlib:2 1 3 Isengard:~ # Isengard:~ # mount -v /mnt/BookTelcontar/ mount: /dev/mapper/cr_my_book_tlcntr mounted on /mnt/BookTelcontar. Isengard:~ # grep BookTelcontar /etc/fstab /dev/mapper/cr_my_book_tlcntr /mnt/BookTelcontar btrfs lazytime,compress 1 3 Isengard:~ # mount -v | grep BookTelcontar /dev/mapper/cr_my_book_tlcntr on /mnt/BookTelcontar type btrfs (rw,relatime,lazytime,compress=zlib,space_cache,subvolid=5,subvol=/) Isengard:~ # It appears that only zlib is supported. -- Cheers / Saludos, Carlos E. R. (from 15.0 x86_64 at Telcontar)
participants (2)
-
Adam Mizerski
-
Carlos E. R.