Re: new database files not compressed

Hamish Moffatt
2020-08-31T12:55:04Z

On 31/8/20 9:15 pm, Roman Mamedov wrote:
> On Mon, 31 Aug 2020 18:53:54 +1000
> Hamish Moffatt <hamish-btrfs@moffatt.email> wrote:
>
>> $ sudo mount -O compress-force=zstd /dev/sdb /mnt/test
> Specifying the filesystem mount options is done with -o, not -O.
> See "man mount".
>
Argh, I messed up the dd test. It does work for dd from /dev/zeroes when
mounted properly. It still doesn't compress my Firebird files though.

$ mount | grep btrfs
/dev/sdb on /mnt/test type btrfs
(rw,relatime,compress-force=zstd:3,space_cache,subvolid=5,subvol=/)
$ dd if=/dev/zero of=zeroes bs=32k count=1024
1024+0 records in
1024+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 0.0244041 s, 1.4 GB/s
$ sudo compsize zeroes
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL        3%      1.0M          32M          32M
zstd         3%      1.0M          32M          32M
$ zcat ~/*.zip | gbak -REP -page 16384 stdin test2.fdb
$ sudo compsize test2.fdb
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL      100%      194M         194M         191M
none       100%      194M         194M         191M
$ isql-fb
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'test3.fdb' page_size 16384;
SQL> ^D
$ sudo compsize test3.fdb
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL      100%      2.2M         2.2M         2.2M
none       100%      2.2M         2.2M         2.2M

Hamish