Date: Sun, 30 May 2010 17:03:43 -0500 From: Kirk Strauser <kirk@strauser.com> To: Garrett Cooper <yanefbsd@gmail.com> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: Make ZFS auto-destroy snapshots when the out of space? Message-ID: <FE2C1544-BB59-4843-86B4-6FE7FD9CD57F@strauser.com> In-Reply-To: <AANLkTilpvnh7gpUCYFSHpxrehNhVl3DiO0OFkKcg7MdX@mail.gmail.com> References: <4C017419.9010909@strauser.com> <AANLkTilpvnh7gpUCYFSHpxrehNhVl3DiO0OFkKcg7MdX@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On May 29, 2010, at 9:58 PM, Garrett Cooper wrote: > So basically you're saying deal with an LRU snapshot deletion when you > reach a certain threshold of free space, type scheme? This might get > tricky, but it does lend itself to other systems I suppose (I hate to > mention it, but the best one I can think of is Windows' system > restore... there might be something else available with OSX's Time > Machine). Time Machine works almost exactly that way. It stores as far back in history as you have hard drive space to hold it. > What would be more tricky is when the automated system is filling in a > bunch of useless snapshots unnecessarily, but as you'd be providing > the snapshot criteria, I suppose that you would know what snapshots > you want to save and what ones you want to toss... I don't think add any trickery. The snapshots are again analogous to how Time Machine works, where you have hourly snapshots, then a week's worth of daily, then a month's worth of weeklies, then as many monthly snapshots as will fit on your hard drive. If you run out of space, delete November, then December. > It's an interesting thought though -- just increases the overall > complexity of the system and may only meet one need. I think the additional complexity would amount to adding a config option to the code that gets run when a disk is full that executes an arbitrary command, namely a user-space shell script that deletes the oldest automatically-generated snapshot. 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. -- Kirk Strauser
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE2C1544-BB59-4843-86B4-6FE7FD9CD57F>