ZFS commands and status
Command | What it does |
zpool status -v <poolname> zpool status -vLP <poolname> |
status of the pool, identifies drives as GUID, shows any data errors
adding the -LP output the name of the drive in /dev/sdX format |
zpool iostat -v <poolname> zpool status -vLP <poolname> |
output the I/O statistics of the pool. Excluding a pool name will show all data for all pools
adding the -LP flag will do that same as above |
zpool list -v <poolname> zpool list -vLP <poolname> |
output status of the pool in question. omitting pool name will show all pools. -LP flag does the same as always. |
zpool scrub <poolname> |
will scrub the pool detecting data errors. will repair errors if sufficient redundancy exists. |
Pool or Device Failure and Recovery
ZFS supports a rich set of mechanisms for handling device failure and data corruption. All metadata and data is checksummed, and ZFS automatically repairs bad data from a good copy when corruption is detected.
In order to take advantage of these features, a pool must make use of some form of redundancy, using either mirrored or raidz groups. While ZFS supports running in a non-redundant configuration, where each root vdev is simply a disk or file, this is strongly discouraged. A single case of bit corruption can render some or all of your data unavailable.
A pool's health status is described by one of four states:
- DEGRADED
-
A pool with one or more failed devices, but the data is still available due to a redundant configuration.
- ONLINE
-
A pool that has all devices operating normally.
- SUSPENDED
-
A pool that is waiting for device connectivity to be restored. A suspended pool remains in the wait state until the device issue is resolved.
- UNAVAIL
-
A pool with corrupted metadata, or one or more unavailable devices and insufficient replicas to continue functioning.
The health of the top-level vdev, such as mirror or raidz device, is potentially impacted by the state of its associated vdevs, or component devices. A top-level vdev or component device is in one of the following states:
- DEGRADED
-
One or more top-level vdevs is in the degraded state because one or more component devices are offline. Sufficient replicas exist to continue functioning.
One or more component devices is in the degraded or faulted state, but sufficient replicas exist to continue functioning. The underlying conditions are as follows:
-
The number of checksum errors exceeds acceptable levels and the device is degraded as an indication that something may be wrong. ZFS continues to use the device as necessary.
-
The number of I/O errors exceeds acceptable levels. The device could not be marked as faulted because there are insufficient replicas to continue functioning.
-
- OFFLINE
-
The device was explicitly taken offline by the zpool offline command.
- ONLINE
-
The device is online and functioning.
- REMOVED
-
The device was physically removed while the system was running. Device removal detection is hardware-dependent and may not be supported on all platforms.
- UNAVAIL
-
The device could not be opened. If a pool is imported when a device was unavailable, then the device will be identified by a unique identifier instead of its path since the path was never correct in the first place.
No Comments