ZFS: zpool history size
jhell at DataIX.net
Sun Sep 11 19:03:17 UTC 2011
On Fri, Sep 09, 2011 at 10:49:58AM +0200, Patrick Proniewski wrote:
> 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 site.
> 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 could recreate my storage pool with all its properties.
> I've noticed that in fact the `zpool history` is limited. I've many automated daily/weekly/monthly snapshots creations and that "noise" is filling the history log and overwrites my precious history.
> Today, my history log is only 13 valuable lines long:
> # 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=500M 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=500M 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=500M 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=500M 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=500M tank/Sites/sites/egales-se
> 2011-07-12.10:56:14 zfs set mountpoint=/Sites/a_supprimer/perso-truchaud-2011071210 tank/user/truchaud
> 2011-07-12.11:04:37 zfs destroy -r tank/user/truchaud
> 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.
> My questions are:
> - what is the zpool history size limit?
> - and is it possible to increase its value?
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 522 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110911/4320246d/attachment.pgp
More information about the freebsd-fs