From owner-freebsd-stable@FreeBSD.ORG Mon May 31 00:08:26 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 228CA106564A for ; Mon, 31 May 2010 00:08:25 +0000 (UTC) (envelope-from christof.schulze@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 922698FC15 for ; Mon, 31 May 2010 00:08:24 +0000 (UTC) Received: (qmail invoked by alias); 31 May 2010 00:08:22 -0000 Received: from g228053210.adsl.alicedsl.de (EHLO klausdieter0815.dyndns.org) [92.228.53.210] by mail.gmx.com (mp-eu004) with SMTP; 31 May 2010 02:08:22 +0200 X-Authenticated: #56306756 X-Provags-ID: V01U2FsdGVkX1/AIL4OzV7AmP+LvdvVXGvmdWMjevUNUL2a3hlof4 FoaW6nMDwNIG/V Received: by myhost.mydomain.de (Postfix, from userid 1001) id A0D3A13132; Mon, 31 May 2010 02:08:22 +0200 (CEST) From: Christof Schulze To: freebsd-stable@freebsd.org Date: Mon, 31 May 2010 02:08:21 +0200 User-Agent: KMail/1.13.3 (FreeBSD/8.0-STABLE; KDE/4.4.3; amd64; ; ) References: <4C017419.9010909@strauser.com> <20100529234507.GD20695@mail.hs.ntnu.edu.tw> <4F444333-C839-4C2F-AA5D-1898192DDE93@strauser.com> In-Reply-To: <4F444333-C839-4C2F-AA5D-1898192DDE93@strauser.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_23vAMpwjIYfQ7mv" Message-Id: <201005310208.22387.christof.schulze@gmx.com> X-Y-GMX-Trusted: 0 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Make ZFS auto-destroy snapshots when the out of space? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 May 2010 00:08:26 -0000 --Boundary-00=_23vAMpwjIYfQ7mv Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Am Sonntag 30 Mai 2010 23:53:06 schrieb Kirk Strauser: > On May 29, 2010, at 6:45 PM, Denny Lin wrote: > > How about writing a shell script with this functionality? Get the > > available disk space using: > > $ zfs list -H -o avail tank > > > > And then compare the figures against a limit. Then delete the oldest > > snapshots when the limit is exceeded. > > That's certainly an option, and easy to implement in a shell script. > It just wouldn't work in the case where a bunch of data comes in > between runs of that script, and that's why I wanted something lower- > level. Hello, this is what I use to create daily zfs snapshots. It might provide a base for developing something more sophisticated Regards Christof -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments --Boundary-00=_23vAMpwjIYfQ7mv--