The post describes few basic commands to check the health of a ZFS pool.
1. Basic Storage Pool Health Status
The simplest way to request a quick overview of pool health status by zpool status -x command.
Example:
# zpool status -x all pools are healthy
You can list the pool state for a specific pool by specifying the pool name as follows:
Example:
# zpool status -x tank pool 'tank' is healthy
2. Detailed Health Status
You can request a more detailed health summary by using the -v option to see if pool state is ONLINE.
Example of a pool in ONLINE state.
# zpool status -v tank pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror ONLINE 0 0 0 c1t0d0 ONLINE 0 0 0 c1t1d0 ONLINE 0 0 0 errors: No known data errors
Example of a pool in DEGRADED state.
# zpool status -v tank pool: tank state: DEGRADED status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using zpool online see: http://www.sun.com/msg/ZFS-8000-2Q scrub: none requested config: NAME STATE READ WRITE CKSUM tank DEGRADED 0 0 0 mirror DEGRADED 0 0 0 c1t0d0 FAULTED 0 0 0 cannot open c1t1d0 ONLINE 0 0 0 errors: No known data errors
– If all virtual devices are ONLINE, then the pool is also ONLINE.
– If any one of the virtual devices is DEGRADED or UNAVAILABLE, then the pool is also DEGRADED.
– If a top-level virtual device is FAULTED or OFFLINE, then the pool is also FAULTED.
– A pool in the ONLINE state is running fine without any issues detected. You can run zpool scrub [poolname] to check data integrity.
– A pool in the DEGRADED state continues to run, but you might not achieve the same level of data redundancy or data throughput than if the pool were online.
– A pool in the FAULTED or UNAVAIL state is usually inaccessible, however there may be occasions where reads succeed, however writes will fail.