From owner-freebsd-stable@FreeBSD.ORG Sun May 30 22:16:28 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 CE68E106566B for ; Sun, 30 May 2010 22:16:28 +0000 (UTC) (envelope-from kirk@strauser.com) Received: from kanga.honeypot.net (kanga.honeypot.net [IPv6:2001:470:a80a:1:21f:d0ff:fe22:b8a8]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2508FC1A for ; Sun, 30 May 2010 22:16:28 +0000 (UTC) Received: from kanga.honeypot.net (localhost [127.0.0.1]) by kanga.honeypot.net (Postfix) with ESMTP id 252064503A; Sun, 30 May 2010 17:16:28 -0500 (CDT) X-Virus-Scanned: amavisd-new at honeypot.net Received: from kanga.honeypot.net ([127.0.0.1]) by kanga.honeypot.net (kanga.honeypot.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MXZGRIt7hwYr; Sun, 30 May 2010 17:16:26 -0500 (CDT) Received: from pooh.honeypot.net (pooh.honeypot.net [IPv6:2001:470:a80a:1:20a:95ff:fed5:10f2]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by kanga.honeypot.net (Postfix) with ESMTPSA id 3D74045034; Sun, 30 May 2010 17:16:26 -0500 (CDT) Message-Id: From: Kirk Strauser To: Xin LI In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 30 May 2010 17:16:25 -0500 References: <4C017419.9010909@strauser.com> X-Mailer: Apple Mail (2.936) Cc: FreeBSD-STABLE Mailing List 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: Sun, 30 May 2010 22:16:28 -0000 On May 30, 2010, at 12:27 AM, Xin LI wrote: > I think this sounds like a good idea but I think we may probably want > to explore a more general mechanism, e.g. a daemon that "listen"s > system events like file system full, etc. and execute some user > defined actions. I could definitely get on board with that, and I think such a mechanism would be generally useful even without my idea. I wouldn't mind having a mechanism to send me an IM whenever I need to respond to something urgently. > One thing that we want to avoid is that by making the "automatic > recycle" we would open a new race between system and user backup > programs, i.e. if you remove an intermediate snapshot, 'zfs send' may > fail at receiving side, if incremental send is being used. We would > need a way to "notify" that a 'zfs send' is underway. Well, two things about that: first, if I were implementing it in a vacuum without any input from anyone else, I'd make it simply delete the oldest snapshot. There's precedence in OS X's Time Machine, and that's probably what most people would want and expect anyway. Second, I'd treat those almost as "property" of the OS. While there's nothing magical about them, they're created (and subject to deletion) at the whim of the system, and you shouldn't be sending or receiving them or doing anything else that assumes their integrity. You could still create and destroy your own snapshots as needed, but the OS would manage these on its own. Again, this is how I would handle it in a vacuum if I didn't know or care how anyone else wanted to use it. Still, I think those might be reasonable assumptions. -- Kirk Strauser