Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2021 12:58:00 -0800
From:      David Christensen <dpchrist@holgerdanske.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: zfs out of space
Message-ID:  <ae055d82-54e5-3db5-8fa3-4d44f79c5f85@holgerdanske.com>
In-Reply-To: <CAM8r67A7GVzEeiwLQRnRpmBfR6aDh54Rji3-NW=Hfcz1%2BFYj=g@mail.gmail.com>
References:  <CAM8r67AtZzh23XT0X%2BLszB8Ru=SCo0p4EJG9m9zQ0rBUOzBvqw@mail.gmail.com> <19e7598f-ed3b-75a6-8e98-2900fe1a828c@holgerdanske.com> <CAM8r67A7GVzEeiwLQRnRpmBfR6aDh54Rji3-NW=Hfcz1%2BFYj=g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/3/21 7:01 AM, Tomasz CEDRO wrote:
> On Tue, Mar 2, 2021 at 4:28 AM David Christensen
> <dpchrist@holgerdanske.com> wrote:
>> I would try discarding the checkpoint:
>> # zpool checkpoint --discard pool
> 
> Thank you David! That helped :-)

YW.


> In addition to that I have created sub volumes to obtain more granular
> control over snapshots, that required moving old directories into new
> mount point locations, and mv did not delete all moved files thus
> space exhaustion. 

That explains it.


> I can now run snapshots in cron everytday for
> critical data, every week for less important data, and once per month
> for general use data :-)

I do the same.


> Is there any way to create a zfs volume from an existing directory?
> Not to move all the files? :-)

I have not found a way to convert a directory into a ZFS filesystem 
directly.  I would create the new ZFS filesystem with a temporary 
mountpoint, move the files, remove the directory, and set the mountpoint 
of the dataset.  If I'm feeling paranoid, I would copy, rather than 
move, and I would validate before removing the directory and its 
contents.  Checkpointing is another option.  But, the latter two require 
enough free space in the pool to hold a second copy of the content.


My pools are HDD's.  SSD caches are a big help.  I need to try mirrored 
SSD intent logs.


lz4 compression saves space, and I have not seen any performance penalty.


deduplication is a double-edged sword.  I have seen HDD throughput drop 
by two orders of magnitude without an SSD cache, and by one order of 
magnitude with.  But for repetitive snapshots of bulk data with small 
changes, such as daily backups, the space savings can be considerable.


I keep logs of my ZFS administration console sessions, and convert 
frequently used commands into shell scripts to save typing and to get 
consistency.


David



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ae055d82-54e5-3db5-8fa3-4d44f79c5f85>