check_netapp_spare (Spare-Disk/-Partition Check)

Depending on the subcommand (disk|partition), it is checked whether there are enough matching spare disks or spare partitions available for each disk or partition in use.

Usage

$ check_netapp_spare disk|partition -H <host> [...] [--help]

Description

The check does not count the spares per node. It checks every data disk (or partition) on its own: it counts the spares that could replace this disk and compares that number with the thresholds. So the output has one line for each checked disk or partition, with the number of matching spares, e.g. node-01.1.0.3.sas: 2 spare-disks.

disk: A spare disk matches a data disk if it is zeroed and has the same type, class, rotation speed (rpm), usable size and owner node. With --ignore-specs single properties can be left out when matching, e.g. --ignore-specs=size if the spares are slightly larger than the data disks. Several values can be given separated by commas, e.g. --ignore-specs=size,owner.

--ignore-specs A spare also matches if it …
class has another class (e.g. capacity instead of performance)
owner belongs to another node
rpm has another rotation speed
size has another usable size

The disk type (e.g. sas, ssd) can not be ignored, and a spare always has to be zeroed. type is the former name of owner and is still accepted.

partition: A spare partition matches a partition if it has the same usable size and owner node.

Important Parameters

--include / --exclude: Filter on the instance name. For spare disk it is <node>.<disk>.<type> (e.g. node-01.1.0.3.sas), for spare partition it is <owner-node>.<partition> (e.g. node-01.1.0.3.P1). See Regular Expressions.

--warning / --critical: The status is WARNING if the number of matching spares is less than or equal to the warning threshold, and CRITICAL if it is less than or equal to the critical threshold. Defaults are --warning=2 and --critical=1: 2 spares give WARNING, 1 or 0 spares give CRITICAL. The critical threshold must not be higher than the warning threshold.

Thresholds 0 spares 1 spare 2 spares 3 or more
-w 2 -c 1 (default) CRITICAL CRITICAL WARNING OK
-w 1 -c 0 CRITICAL WARNING OK OK
-w 0 -c 0 (one spare is enough) CRITICAL OK OK OK

Setting only -w 1 keeps the default -c 1, so one spare is still CRITICAL. To accept one spare as OK, set -w 0 -c 0.

Note: Non-zeroed spare-disks are not considered as valid spares.

For all other parameters consult --help on the commandline.

sim96cluster::storage aggregate> show-spare-disks                                         
                                                                      
Original Owner: sim96cluster-01
 Pool0
  Spare Pool

                                                             Usable Physical
 Disk             Type   Class          RPM Checksum           Size     Size Status
 ---------------- ------ ----------- ------ -------------- -------- -------- --------
 NET-1.4          FCAL   performance  15000 block            1020MB   1.00GB not zeroed
 NET-1.5          FCAL   performance  15000 block            1020MB   1.00GB not zeroed
 NET-1.6          FCAL   performance  15000 block            1020MB   1.00GB not zeroed
 NET-1.18         FCAL   performance  15000 block            1020MB   1.00GB not zeroed
 NET-1.19         FCAL   performance  15000 block            1020MB   1.00GB not zeroed
 NET-1.27         FCAL   performance  15000 block            1020MB   1.00GB zeroed
 NET-1.28         FCAL   performance  15000 block            1020MB   1.00GB zeroed
7 entries were displayed.

Examples

Simple Examples

./check_netapp_spare disk -H filer
NETAPP SPARE OK - 28 disks checked
...

Checks all nodes for sufficient spare-disks.

./check_netapp_spare partition -H filer -w 1 -c 0
NETAPP SPARE WARNING - 68 partitions checked, 68 WARNING
node-01.1.0.23.P3: 1 spare-partitions (WARNING)
node-01.1.0.23.P2: 1 spare-partitions (WARNING)
node-02.1.0.23.P1: 1 spare-partitions (WARNING)
...

Checks all nodes for sufficient spare-partitions. With -w 1 -c 0, one spare partition gives WARNING (with the defaults it would be CRITICAL).

./check_netapp_spare disk -H filer -w 0 -c 0
NETAPP SPARE CRITICAL - 81 disks checked, 10 CRITICAL
node-01.1.0.1.sas: 0 spare-disks (CRITICAL), 10000rpm, 587202560000B, class: performance
...
node-01.1.1.10.sas: 1 spare-disks, 10000rpm, 898629632000B, class: performance
...

One matching spare per disk is enough; only disks without any matching spare are CRITICAL.