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.