[zfs-discuss] how to clear zpool history from useless messages?
cks at cs.toronto.edu
Tue Dec 5 12:14:24 EST 2017
> From the timestamps (zpool create on first line is 2012-12-08, second
> line is 2017-04-06) zpool history at least seems to discard entries in
> case it grows beyond some limit.
Yes. The history is stored in an internal log, which is sized to 0.1%
of the *initial* pool size, with a minimum of 128 KB and a maximum of 1
GB. The code that maintains the log always preserves the pool creation
events, but otherwise overwrites old events when the space runs out.
How fast that happens depends on how many operations you do with the
pool, for example how frequently you (or your scripts) make snapshots.
(You can find this code in module/zfs/spa_history.c, in the
Some additional gory details are here:
More information about the zfs-discuss