[OpenIndiana-discuss] new be doesn't keep zfs settings

Bill Sommerfeld sommerfeld at hamachi.org
Thu Jan 18 00:35:52 UTC 2024


On 1/17/24 16:22, Goetz T. Fischer wrote:
> On Wed, 17 Jan 2024 14:34:59 +0100, Marcel Telka wrote:
>> On Wed, Jan 17, 2024 at 08:01:22AM +0100, Goetz T. Fischer wrote:
>>> however, the catch was that the new be, that's created during a "pkg update", doesn't keep the
>>> compression setting. after the reboot i noticed that the new /var had compression set to off again and
>>> therefore was big again. is there something specific i have to do to make the new be keep the zfs
>>> settings?
>>
>> I'd expect this to work out of the box. Could you please share how
>> exaclty this could be reproduced?
> 
> sure, this is the pool of my test installation:
> 
> rpool                                  5.63G  5.51G      124K  /rpool
> rpool/ROOT                             5.03G  5.51G       96K  legacy
> rpool/ROOT/openindiana-2024:01:15      5.03G  5.51G     4.15G  /
> rpool/ROOT/openindiana-2024:01:15/var   905M  5.51G      905M  /var
> rpool/dump                             64.1M  5.51G     64.1M  -
> rpool/export                            192K  5.51G       96K  /export
> rpool/export/home                        96K  5.51G       96K  /export/home
> rpool/swap                              546M  6.03G     13.9M  -
> 
> then i run:
> root at openindiana:~# zfs set compression=on rpool/ROOT/openindiana-2024:01:15/var
> root at openindiana:~# zfs get compression rpool/ROOT/openindiana-2024:01:15/var
> NAME                                   PROPERTY     VALUE     SOURCE
> rpool/ROOT/openindiana-2024:01:15/var  compression  on        local
> 
> and then, as described, after a "pkg update" the compression of the new be's /var is gone again.

While this doesn't directly answer your question as to what's going on,
I generally set compression on the root filesystem of the BE - or on the 
never-mounted parent rpool/ROOT filesystem - and it would be inherited 
from there onto any children like /var; ZFS compression is fast enough 
that you really want it on everywhere except when you know that most of 
what is being stored isn't compressable.

If you want to dig into what's going on I'd look carefully at the code 
in libbe (usr/src/lib/libbe/common/*) and see where it gets properties 
for each filesystem it creates when it's cloning a new BE from an 
existing one.

						- Bill





More information about the openindiana-discuss mailing list