From owner-freebsd-fs@FreeBSD.ORG Sun Sep 11 19:03:17 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E95921065670 for ; Sun, 11 Sep 2011 19:03:16 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9CFF78FC13 for ; Sun, 11 Sep 2011 19:03:16 +0000 (UTC) Received: by yxk36 with SMTP id 36so3310437yxk.13 for ; Sun, 11 Sep 2011 12:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=UZe3gpNmBIHTJmoOI+2vrLnEu8ICWqG9iMhgypCAATU=; b=exx6uLdDP0PeRM9ie2Jqo7dz/wYmNfb1IflL5UjF1fPYCFMeYi8leQX8sTm6YBiZnc BVvBh7szIKkGv1mqe+7GlF20+NVkQjxX2ztR0XLNhgi9V54IVsyqhoViy5NSKWU/PR/g c1m88wHXy8IKI5yK8KrZjyVgb9eOZGJW3LVhM= Received: by 10.42.145.129 with SMTP id f1mr1414432icv.64.1315767795551; Sun, 11 Sep 2011 12:03:15 -0700 (PDT) Received: from DataIX.net (adsl-99-190-81-85.dsl.klmzmi.sbcglobal.net [99.190.81.85]) by mx.google.com with ESMTPS id v2sm18889451ibg.2.2011.09.11.12.03.13 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 11 Sep 2011 12:03:14 -0700 (PDT) Sender: "J. Hellenthal" Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id p8BJ39d8064512 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Sep 2011 15:03:10 -0400 (EDT) (envelope-from jhell@DataIX.net) Received: (from jhell@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id p8BJ39Kg064511; Sun, 11 Sep 2011 15:03:09 -0400 (EDT) (envelope-from jhell@DataIX.net) Date: Sun, 11 Sep 2011 15:03:09 -0400 From: Jason Hellenthal To: Patrick Proniewski Message-ID: <20110911190309.GC62897@DataIX.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xesSdrSSBC0PokLI" Content-Disposition: inline In-Reply-To: Cc: FreeBSD Filesystems Subject: Re: ZFS: zpool history size X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2011 19:03:17 -0000 --xesSdrSSBC0PokLI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 09, 2011 at 10:49:58AM +0200, Patrick Proniewski wrote: > Hello, >=20 > I have a production server hosting about 250 web sites. I'm using ZFS, so= that I can create a dedicated FS whenever a user wants to create a web sit= e. > I've started 6 mouths ago to dump `zpool history` into a file, daily, and= to commit the output to a remote subversion server, so that if I need I co= uld recreate my storage pool with all its properties. > I've noticed that in fact the `zpool history` is limited. I've many autom= ated daily/weekly/monthly snapshots creations and that "noise" is filling t= he history log and overwrites my precious history. >=20 > Today, my history log is only 13 valuable lines long: >=20 > # zpool history | grep -v @ > History for 'tank': > 2011-02-22.14:17:10 zpool create tank da1 > 2011-06-30.16:46:38 zfs create tank/Sites/m > 2011-06-30.16:46:38 zfs set refquota=3D500M tank/Sites/m > 2011-07-11.10:46:16 zfs create tank/Sites/sites/egales-uk > 2011-07-11.10:46:17 zfs set refquota=3D500M tank/Sites/sites/egales-uk > 2011-07-11.10:46:41 zfs create tank/Sites/sites/egales-es > 2011-07-11.10:46:42 zfs set refquota=3D500M tank/Sites/sites/egales-es > 2011-07-11.10:46:47 zfs create tank/Sites/sites/egales-ro > 2011-07-11.10:46:47 zfs set refquota=3D500M tank/Sites/sites/egales-ro > 2011-07-11.10:46:51 zfs create tank/Sites/sites/egales-se > 2011-07-11.10:46:52 zfs set refquota=3D500M tank/Sites/sites/egales-se > 2011-07-12.10:56:14 zfs set mountpoint=3D/Sites/a_supprimer/perso-truchau= d-2011071210 tank/user/truchaud > 2011-07-12.11:04:37 zfs destroy -r tank/user/truchaud >=20 > Every interesting events between 2011-02-22 and 2011-06-30 is gone, that'= s more than 700 lines of ZFS command. Thanks to svn, I lose nothing. >=20 > My questions are:=20 > - what is the zpool history size limit?=20 > - and is it possible to increase its value? >=20 I do not have this answer off the top of my head because as explained to me once or I read it in some internal documentation. The pool history was supposed to be static to the pool until it was destroyed... Ill look into this though. As for a temporary workaround I am almost pretty sure you might have already done this is run a `zpool history` per day and log that to something like /var/log/zpool.history with a dated header and footer and just continue to append to that file while you chflags sappnd,sunlnk $FILE. --xesSdrSSBC0PokLI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) Comment: http://bit.ly/0x89D8547E iQEcBAEBAgAGBQJObQXsAAoJEJBXh4mJ2FR+Xg8H/jdPruQHwU+mlHuLz5/p301c VKApfB1u+u1tepyh8QMhnxtYMmo6QGjKjRPyQ/ukHJAayBtkc6SExdixzSIKUzTB yfxAu+LgXhTDWMymEtbxpTvzBDJh+zM10Q1vEztgbiGfRZLvGLAg1B0R0W/WE4CD OXqszlGIBSvNzfYWXplY3y94PexR2a/0GHaizRrbulBxKfb7ZiwCm2FAgxDdQZLx E25YSKjuvmCzpXX37llFyNX+SMCcbVxsAV6Q1Do20FvY+4Udm67BZtajluomy1qA Gt9O5IgC8CQyzHd5SrkEfHfOUhGDR4HKXwAXj84gXF8IompVceaWiOjELUY+qzg= =Fbmi -----END PGP SIGNATURE----- --xesSdrSSBC0PokLI--