Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Sep 2011 15:03:09 -0400
From:      Jason Hellenthal <jhell@DataIX.net>
To:        Patrick Proniewski <patpro@patpro.net>
Cc:        FreeBSD Filesystems <freebsd-fs@freebsd.org>
Subject:   Re: ZFS: zpool history size
Message-ID:  <20110911190309.GC62897@DataIX.net>
In-Reply-To: <E8158B0B-A303-4873-8419-177D79848400@patpro.net>
References:  <E8158B0B-A303-4873-8419-177D79848400@patpro.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110911190309.GC62897>