2 Replies Latest reply on Feb 19, 2013 2:27 PM by abrante

    zpool history


      I want to flush zpool history or keep only 100 last commands.

      How i do that?

      thank you


      # zpool history| wc -l

      # cat /etc/release
      Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
      Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
      Assembled 23 August 2011
        • 1. Re: zpool history
          I'm not sure you can, the use of "zpool history" as a audit function would be quite worthless if it could be tampered with. After all, if you know that only 100 lines are kept, its quite easy to generate a 100 snapshot commands to fill it up..

          The closest i can think of is:
          zpool history |head -100

          • 2. Re: zpool history
            Found the specs:

            The features of the history log are as follows:

            The log cannot be disabled.

            The log is saved persistently on disk, which means the log is saved across system reboots.

            The log is implemented as a ring buffer. The minimum size is 128 Kbytes. The maximum size is 32 Mbytes.

            For smaller pools, the maximum size is capped at 1% of the pool size, where size is determined at pool creation time.

            The log does not require any administration. This means that you do not need to tune the size of the log or change the location of the log.