null

ZFS Resilvering

Enterprise Resource Center • ZFS Knowledge Base

ZFS Resilvering

Resilvering is the process ZFS uses to reconstruct required data onto a replacement, newly attached or returning storage device. Understanding how resilvering works is critical when replacing failed drives and restoring redundancy to a degraded ZFS pool.

Drive Replacement Redundancy Recovery Mirrors RAIDZ Pool Recovery
Tech Supply Direct
Quick Answer

What Is ZFS Resilvering?

ZFS resilvering is the process of reconstructing data that ZFS knows is missing or out of date on a storage device. It commonly occurs when a failed drive is replaced, a new device is attached to a mirror, or a device returns after being unavailable.

Unlike a scrub, which examines all allocated data to verify checksums and search for errors, a normal resilver focuses on data ZFS already knows needs to be brought up to date.

Recovery Fundamentals

ZFS Resilvering at a Glance

PURPOSE
Restore Data Reconstructs data that should exist on a replacement, attached or returning device.
TRIGGER
Device Change Common after replacing a failed drive or attaching a new mirror member.
SOURCE
Surviving Data ZFS uses surviving mirror copies or RAIDZ redundancy to reconstruct required blocks.
MONITOR
zpool status Pool status displays resilver progress and estimated completion information.
IMPACT
I/O Intensive Resilvering competes with normal workload activity for storage I/O.
Reconstruction Process

How Does ZFS Resilvering Work?

ZFS tracks which portions of a device require reconstruction. During a normal healing resilver, ZFS identifies data that is known to be out of date, reads the required information from surviving redundant storage and reconstructs that data onto the affected device.

STEP 1
Device Fails A mirror or RAIDZ member becomes unavailable or is identified for replacement.
STEP 2
Replacement Added The administrator replaces the failed device or attaches another suitable device.
STEP 3
Data Reconstructed ZFS reconstructs required data using surviving redundant members.
STEP 4
Redundancy Restored When reconstruction completes successfully, the vdev returns to its intended redundancy level.
Simplified Example

Replacing a Failed Drive in a ZFS Mirror

BEFORE FAILURE

Healthy Mirror

Drive A — ONLINE
Drive B — ONLINE
DRIVE FAILURE

Degraded Mirror

Drive A — ONLINE
Drive B — FAULTED
REPLACEMENT

Resilvering

Drive A — ONLINE
Drive C — RESILVERING
Drive Replacement

Replacing a Drive and Starting a Resilver

A common replacement operation uses zpool replace. When a device is replaced, ZFS automatically begins the resilvering process required to populate the replacement.

zpool replace tank /dev/old-drive /dev/new-drive

Device identifiers differ by operating system and storage configuration. Administrators should verify the exact failed and replacement device before issuing a replacement command.

In-Place Replacement

What If the New Drive Uses the Same Device Path?

If a failed physical drive has already been removed and its replacement appears under the same device path, OpenZFS can use the replacement form without specifying a second device.

zpool replace tank /dev/failed-drive
Monitoring Progress

How to Check ZFS Resilver Progress

The primary command for monitoring pool health and an active resilver is zpool status.

zpool status tank
EXAMPLE STATUS INFORMATION
scan: resilver in progress 1.20T scanned 620G issued 480G resilvered 52% done estimated time remaining

Exact status output varies by OpenZFS version, platform, pool layout and workload. Progress percentages and completion estimates are approximate.

Rebuild Performance

What Determines ZFS Resilver Time?

There is no universal resilver time. Reconstruction speed depends on the pool, devices, data layout and competing workload.

Amount of Data More allocated data requiring reconstruction generally means more work.
Drive Performance HDD and SSD throughput, latency and device condition affect reconstruction speed.
Pool Layout Mirror, RAIDZ and other vdev configurations have different reconstruction characteristics.
Fragmentation Data layout and fragmentation can influence the efficiency of resilver I/O.
Active Workload Production reads and writes compete with resilver activity for available storage resources.
Remaining Device Health Slow or error-prone surviving devices can significantly affect reconstruction.
Important

A Resilvering Pool May Still Have Reduced Redundancy

Starting a resilver does not mean redundancy has already been restored. Until enough required data has been reconstructed, the affected vdev may remain degraded and have less failure tolerance than it normally provides.

Additional device failures or unreadable data during this period can therefore be more consequential. Administrators should monitor pool status and address failing hardware promptly.

VDEV Layout

Mirror vs RAIDZ Resilvering

ZFS MIRROR

Copy From Surviving Mirror Data

In a mirrored vdev, another mirror member provides redundant copies of the data required to populate the replacement device.

RAIDZ

Reconstruct From RAIDZ Redundancy

In RAIDZ, ZFS reconstructs missing data using the surviving data and parity information available within the RAIDZ vdev.

Commonly Confused Operations

ZFS Resilver vs ZFS Scrub

Resilvering and scrubbing use related ZFS scanning machinery, but they serve different purposes.

Feature Resilver Scrub
Primary Purpose Restore out-of-date data Verify pool data
Typical Trigger Replacement or returning device Scheduled or manual integrity check
Data Examined Data known to require updating All allocated data
Can Repair? Reconstructs required redundant data Can repair detected damage when valid redundancy exists
I/O Intensive? Yes Yes
Because both operations are I/O intensive, OpenZFS does not perform a normal scrub and resilver simultaneously.
Advanced OpenZFS Feature

Sequential Reconstruction

Supported OpenZFS configurations can use sequential reconstruction when attaching or replacing a device. Instead of immediately performing checksum-verifying healing reconstruction, the new device is rebuilt sequentially to restore redundancy more quickly.

STANDARD
Healing Resilver Uses normal ZFS reconstruction and checksum verification behavior.
SEQUENTIAL
Restore Redundancy First Reconstructs sequentially, followed by an automatic scrub to verify checksums.
zpool replace -s tank /dev/old-drive /dev/new-drive
Important: sequential reconstruction is not supported for RAIDZ configurations. Because checksums are not verified during the sequential reconstruction itself, OpenZFS starts a scrub when the reconstruction completes.
Replacement Workflow

General ZFS Drive Replacement Process

01
Identify the Device Confirm the exact faulted device and its physical location before replacement.
02
Install Replacement Install a compatible replacement device with suitable capacity.
03
Issue Replacement Use the appropriate zpool replacement operation for the platform and configuration.
04
Monitor Resilver Watch progress and device health with zpool status.
05
Confirm Healthy State Verify that resilvering completes and investigate any remaining read, write or checksum errors.
Pool Health

Understanding READ, WRITE and CKSUM Errors

When checking zpool status, administrators should pay attention to the per-device error counters.

READ
Read Errors I/O errors reported while attempting to read from the device.
WRITE
Write Errors I/O errors reported while attempting to write to the device.
CKSUM
Checksum Errors Data was returned but did not match the checksum ZFS expected.
Hardware Replacement Warning

Verify the Physical Drive Before Removing Hardware

Device names such as sda, sdb or other operating system identifiers should not be assumed to correspond to a particular physical bay without verification.

Removing the wrong healthy member from an already degraded vdev can reduce redundancy further and may cause data loss if the remaining redundancy is insufficient.

Operational Guidance

ZFS Resilvering Best Practices

Verify the Failed Drive Confirm device identity and physical bay location before removing hardware.
Use Compatible Replacements Verify capacity, interface, sector characteristics and system compatibility.
Monitor the Resilver Use zpool status to watch progress and identify additional device errors.
Watch Surviving Drives Reconstruction places additional read activity on the devices supplying the surviving data.
Maintain Backups Resilvering restores redundancy; it does not replace an independent backup strategy.
Frequently Asked Questions

ZFS Resilvering FAQ

What does resilvering mean in ZFS?

Resilvering reconstructs data ZFS knows is missing or out of date on a replacement, attached or returning storage device.

Does ZFS automatically resilver a replacement drive?

Yes. Once the appropriate replacement or attachment operation is performed, ZFS begins the required reconstruction automatically.

How do I check ZFS resilver progress?

Use zpool status. It reports an active resilver and provides approximate progress and completion information.

How long does a ZFS resilver take?

Resilver time depends on the amount of data requiring reconstruction, device performance, vdev layout, fragmentation and active workload.

Is a ZFS resilver the same as a scrub?

No. A resilver reconstructs data ZFS knows is out of date, while a scrub examines allocated pool data to verify checksums and discover integrity problems.

Can I use the ZFS pool during resilvering?

A functioning degraded pool can continue serving workloads while resilvering, although performance may be affected and redundancy may remain reduced.

Does resilvering read the entire drive?

A normal resilver focuses on data ZFS knows needs to be brought up to date rather than treating the operation as a blind sector-for-sector copy of the entire device.

What happens if another drive fails during resilvering?

The result depends on the vdev layout and remaining redundancy. If failures exceed the redundancy provided by the affected vdev, data may become unavailable or unrecoverable.

Is sequential resilvering supported on RAIDZ?

OpenZFS sequential reconstruction using the -s replacement or attach option is not supported for RAIDZ configurations.

ZFS Drive Replacement

Need a Replacement Drive for a ZFS Server?

Tech Supply Direct can help identify compatible enterprise HDDs and SSDs for ZFS storage servers, NAS systems and capacity upgrades—including SAS, SATA and NVMe storage for supported enterprise platforms.