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

David Magda dmagda at ee.ryerson.ca
Mon May 31 00:40:29 UTC 2010


On May 30, 2010, at 18:03, Kirk Strauser wrote:

> The "only one need" that it addresses is that now FreeBSD would come  
> with a built-in recovery system. Did a "make installworld" but  
> screwed something up and ended up with a non-bootable system? Pop in  
> a recovery CD and revert to the "4 hours ago" snapshot, then reboot.  
> Voila! It never happened. Accidentally deleted /etc/passwd? Retrieve  
> the version from /.zfs/snapshot/weekly-2010-21/etc/passwd . Just  
> realized that you deleted an important file 3 months ago and only  
> keep 2 weeks worth of backups? No problem, as long as you haven't  
> filled up your hard drive since then.

All scriptable.

For the case of "make installworld", a make.conf variable can be  
created to run a "zfs snapshot" before any kind of 'make install';  
this could be for both Ports and the base system. Portmanager and/or  
portupgrade could also be expanded to optionally do this.

(Open)Solaris already has this with the Live Upgrade and boot  
environment idea if you want a comparison:

	http://docs.sun.com/app/docs/doc/820-5238/ggavn

	http://docs.sun.com/app/docs/doc/819-2240/bootadm-1m
	http://docs.sun.com/app/docs/doc/819-2379/gglaj



More information about the freebsd-stable mailing list