null

What is a ZFS VDEV?

Enterprise Resource Center • ZFS Knowledge Base

Understanding ZFS VDEVs

A VDEV, or virtual device, is one of the fundamental building blocks of a ZFS storage pool. VDEV design determines how drives are grouped, how redundancy is provided and how capacity and performance are contributed to the overall zpool.

VDEV Zpool RAIDZ1 RAIDZ2 RAIDZ3 Mirrors
Tech Supply Direct
Quick Answer

What Is a VDEV in ZFS?

A ZFS VDEV is a virtual device that provides storage to a ZFS pool. A VDEV can be constructed from one drive or multiple drives arranged as mirrors or RAIDZ groups. One or more VDEVs are then combined to create the overall zpool.

VDEV layout is important because redundancy exists primarily within each VDEV. The failure tolerance of the entire pool therefore depends heavily on the design of every VDEV that contributes storage to it.

ZFS Storage Hierarchy

Drives → VDEVs → Zpool

Understanding this hierarchy is one of the most important steps in understanding ZFS storage design.

LEVEL 1

Physical Drives

HDDs, SSDs or other supported block-storage devices provide the physical capacity.

LEVEL 2

VDEVs

Drives are grouped into VDEVs with a specific redundancy layout such as a mirror or RAIDZ.

LEVEL 3

Zpool

One or more VDEVs contribute capacity and performance to the ZFS storage pool.

The zpool uses the storage provided by its VDEVs. The VDEV configuration therefore has major consequences for pool redundancy, usable capacity and performance.
Common VDEV Layouts

What Types of ZFS VDEVs Are Common?

The VDEV layout determines how data and redundancy are distributed across the drives contained within that VDEV.

SINGLE DEVICE

Single-Disk VDEV

A VDEV can consist of one storage device. By itself, this layout does not provide redundancy against failure of that device.

MIRRORED VDEV

ZFS Mirror

Multiple devices hold redundant copies of data. Mirrored VDEVs are commonly used where redundancy and strong random I/O performance are priorities.

ZFS Mirror Guide →
SINGLE-PARITY VDEV

RAIDZ1

RAIDZ1 uses single parity and can tolerate one device failure within that RAIDZ1 VDEV.

RAIDZ1 Guide →
DOUBLE-PARITY VDEV

RAIDZ2

RAIDZ2 uses double parity and can tolerate two device failures within that RAIDZ2 VDEV.

RAIDZ2 Guide →
TRIPLE-PARITY VDEV

RAIDZ3

RAIDZ3 uses triple parity and can tolerate three device failures within that RAIDZ3 VDEV.

RAIDZ3 Guide →
Critical ZFS Concept

Redundancy Exists Inside the VDEV

One of the most important ZFS design principles is that drive-failure protection is determined by the redundancy of the individual VDEV. Adding multiple VDEVs to a pool does not automatically make a non-redundant VDEV redundant.

If a top-level VDEV is lost beyond its redundancy tolerance, the storage pool can be lost because the pool depends on all of its top-level data VDEVs.

Example Pool Design

Example: Two Mirrored VDEVs in One Zpool

MIRROR VDEV 1

Drive A + Drive B

Two drives store redundant copies within the first VDEV.

MIRROR VDEV 2

Drive C + Drive D

Two additional drives create a second mirrored VDEV.

ZFS Storage Pool Both mirrored VDEVs contribute storage and performance to the zpool.
Pool Scaling

Why Use Multiple VDEVs?

A zpool can contain multiple top-level data VDEVs. Adding appropriate VDEVs increases the pool's available capacity and can also increase aggregate I/O capability because ZFS can distribute data across the pool's VDEVs.

More Capacity Additional VDEVs contribute additional usable storage to the pool.
More I/O Resources Multiple VDEVs can provide additional opportunities for parallel I/O.
Pool Expansion New top-level VDEVs can be added to expand many ZFS pool designs.
Design Matters Added VDEVs should be planned carefully because their redundancy becomes part of the pool design.
Capacity Planning

How VDEV Layout Affects Usable Capacity

VDEV Type Redundancy Capacity Cost General Characteristic
Single Device None No redundancy overhead Maximum raw capacity, no device-failure protection
Mirror Redundant copies Capacity used for mirrored copies Strong redundancy and useful I/O characteristics
RAIDZ1 Single parity Equivalent capacity affected by one parity level Higher usable capacity than equivalent-width higher-parity RAIDZ layouts
RAIDZ2 Double parity Equivalent capacity affected by two parity levels Greater fault tolerance than RAIDZ1
RAIDZ3 Triple parity Equivalent capacity affected by three parity levels Highest parity protection of the three RAIDZ levels

Actual usable ZFS capacity also depends on drive sizes, filesystem overhead, pool allocation, metadata and other configuration factors.

Drive Selection

Should Drives in a VDEV Be the Same Size?

Using drives with similar capacity and performance characteristics is generally the cleanest approach when designing data VDEVs.

In many redundant configurations, usable capacity is constrained by the smallest device in the VDEV. Mixing very different drive sizes can therefore leave part of the larger drives unavailable for ordinary VDEV capacity.

Performance Planning

VDEV Design Affects ZFS Performance

Capacity is not the only reason to think carefully about VDEV layout. Different VDEV designs provide different performance characteristics.

Random I/O Mirror-based pools are often attractive for workloads with significant random I/O.
Sequential Workloads RAIDZ can provide attractive capacity efficiency for large sequential storage workloads.
Number of VDEVs Multiple data VDEVs can increase available opportunities for parallel I/O.
Drive Performance HDD, SSD, SAS, SATA and NVMe characteristics remain important to the final result.
Common Design Decision

Mirror VDEVs or RAIDZ VDEVs?

There is no single VDEV layout that is best for every ZFS deployment. Mirrors and RAIDZ make different tradeoffs between usable capacity, redundancy, I/O behavior, drive count and expansion strategy.

MIRRORS

Performance & Flexibility

Commonly considered where random I/O, resilver behavior and incremental expansion using additional mirror VDEVs are important design considerations.

RAIDZ

Capacity & Parity Protection

Commonly considered where capacity efficiency and parity-based redundancy across larger groups of drives are important.

Failure Tolerance

What Happens If a VDEV Fails?

A degraded VDEV can continue operating while its configured redundancy remains intact. For example, RAIDZ2 can tolerate up to two failed devices within that RAIDZ2 VDEV.

If failures exceed the VDEV's redundancy and the top-level VDEV can no longer provide its data, the consequences can extend to the entire pool. This is why VDEV layout should be designed before the pool is placed into production.

Drive Replacement

VDEVs and ZFS Resilvering

When a failed or replaced device belongs to a redundant VDEV, ZFS may need to reconstruct the required data onto the replacement device. This process is called resilvering.

ZFS Pool Planning

Questions to Ask Before Choosing a VDEV Layout

How Much Capacity? Determine required usable capacity rather than raw drive capacity alone.
How Much Redundancy? Decide how many simultaneous device failures the VDEV should tolerate.
What Workload? VM storage, databases, backups and bulk file storage can have different I/O patterns.
How Will It Expand? Consider how additional capacity will be added throughout the system's service life.
Which Drives? Capacity, interface, endurance and performance all matter.
What Backup Strategy? VDEV redundancy does not eliminate the need for independent backups.
Choose a RAIDZ VDEV

Compare RAIDZ Redundancy Levels

COMPARISON

RAIDZ1 vs RAIDZ2

Compare single-parity and double-parity VDEVs for capacity and fault tolerance.

View Comparison →
COMPARISON

RAIDZ2 vs RAIDZ3

Compare double-parity and triple-parity VDEVs for higher levels of drive-failure protection.

View Comparison →
Data Protection

Redundant VDEVs Are Not Backups

A mirrored or RAIDZ VDEV can protect against specified device failures, but redundancy does not protect against every cause of data loss. Accidental deletion, malicious changes, software problems, catastrophic hardware loss and other events can still affect the storage pool.

Frequently Asked Questions

ZFS VDEV FAQ

What does VDEV mean in ZFS?

VDEV means virtual device. It is a storage building block that contributes capacity to a ZFS pool.

Is a VDEV the same as a zpool?

No. A zpool contains one or more VDEVs. The VDEVs provide the physical storage capacity used by the pool.

Can a VDEV contain one drive?

Yes. A single storage device can be used as a VDEV, although a single-device data VDEV does not provide redundancy against failure of that drive.

Can a zpool contain multiple VDEVs?

Yes. ZFS pools can contain multiple top-level data VDEVs that contribute capacity and I/O resources.

Is RAIDZ a VDEV?

RAIDZ1, RAIDZ2 and RAIDZ3 are common layouts used for ZFS data VDEVs.

Is a ZFS mirror a VDEV?

Yes. Multiple drives can be grouped into a mirrored VDEV that stores redundant copies of the data.

What happens if one VDEV fails?

If failures exceed the redundancy available within a top-level data VDEV, the entire pool can be affected because the pool depends on all of its data VDEVs.

Can VDEVs use different drive sizes?

They can, but usable capacity in many redundant VDEV layouts is constrained by the smallest participating drive, so similar capacities are usually preferable.

Are more VDEVs faster?

Additional data VDEVs can increase aggregate I/O opportunities, but actual performance depends on workload, VDEV type, drives and the complete system.

Which VDEV layout is best?

There is no universal best layout. Capacity, fault tolerance, workload, performance, drive count and future expansion requirements should guide the design.

Enterprise Storage Hardware

Planning a ZFS Storage Server?

Tech Supply Direct can help identify compatible enterprise HDDs, SSDs, SAS and SATA storage, server memory and related hardware for ZFS storage deployments and upgrades.