Make ZFS auto-destroy snapshots when the out of space?

Gary Palmer gpalmer at freebsd.org
Mon May 31 00:55:46 UTC 2010


On Sun, May 30, 2010 at 08:33:40PM -0400, David Magda wrote:
> On May 29, 2010, at 16:07, Kirk Strauser wrote:
> 
> >I'd propose standardizing on an attribute like  
> >org.freebsd:allowautodestroy. Modify ZFS's disk full behavior [...]   
> >Also run a daily periodic script to ensure that the free space stays  
> >below a configurable threshold each day so that ZFS isn't constantly  
> >butting up against completely full drives.
> 
> 
> Why not simply have a script that runs and checks for pool usage and  
> then deletes snapshots with that attribute if necessary? Why do you  
> need to have have it built into ZFS?

Suggestion: zfs can have settings that trigger an event to be delivered
to devd when a filesystem hits a certain percentage full (or under a
certain percentage free space left).  That way you can have the event
triggered at the filesystem level, which I believe is the correct thing
to do (so you're not polling), and also delivers the level of control
you want.

Regards,

Gary


More information about the freebsd-stable mailing list