The check_netapp_pro suite of scripts provides a suite of tools for retrieving data values on NetApp filers and checking them against reference values. Among other features, the script can check for fractional reserves values. Fractional reserves, expressed as percentages and also known as LUN overwrite reserves, are a NetApp feature which enables control of the overwrite reserve. This feature can be used to maximize storage utilization for a given volume.

The check_netapp_pro scripts produce various output reports which display this value amongst many others. This, in turn, enables a user to check whether the fractional reserves are configured as expected, and whether the space remaining for overwrites is sufficient for any given case. Firstly, let’s see what a typical run might output for us using the script.

$ -m 7m -H HOST --in=vol --in=options 
CLI-OUTPUT: root, diskroot, nosnap=off, nosnapdir=off, minra=off, no_atime_update=off, nvfail=off, ignore_inconsistent=off, snapmirrored=off, create_ucode=off, convert_ucode=off, maxdirsize=16291, schedsnapname=ordinal, fs_size_fixed=off, guarantee=volume, svo_enable=off, svo_checksum=off, svo_allow_rman=off, svo_reject_errors=off, no_i2p=off, fractional_reserve=100, extent=off, try_first=volume_grow, read_realloc=off, snapshot_clone_dependency=off, dlog_hole_reserve=off, nbu_archival_snap=off 
No pattern for expected output specified.

Rather than wade through each of those options looking for a particular configuration key and value, we can let the script do all the work and tell it to warn us, or not, under certain conditions. We’ll use the ‑‑result_like and ‑‑result_unlike arguments to inspect/check the output, based on certain search criteria.

$ -m 7m -H HOST ‑‑in=vol ‑‑in=options ‑‑in=vol0 ‑‑out_like="fractional_reserve=100" ‑‑result_unlike=WARNING
OK - output matches pattern 'fractional_reserve=100'

The above returns OK only if the fractional_reserve equals 100. In any other case it would return WARNING.

$ -m 7m -H HOST ‑‑in=vol ‑‑in=options ‑‑in=vol0 ‑‑out_like="fractional_reserve=100" ‑‑result_like=WARNING
WARNING - output matches pattern 'fractional_reserve=100'

The above returns a WARNING if the fractional_reserve equals 100.

It should be clear that combining the ‑‑out_like and ‑‑result_like and ‑‑result_unlike parameters is a fairly flexible way to control both the output from the script and the reaction of the script, generating feedback and warnings as required. For more information on how to use the program see the script ‑‑help output.