Monday to Saturday 8:00–19:00, Sunday closedFree courier collection throughout Switzerland · drop-off in Lugano, Zurich and Sant'Antonino

Business

Losing a ZFS special vdev: why the whole pool is at risk

A special vdev puts the metadata of a ZFS pool, and optionally its small files, on fast SSDs. Directory listings, backups and VMs become much faster. It is often added like a cache, with one or two consumer SSDs. But it is not a cache: the metadata lives only there. If the special vdev is lost, the pool loses the map of every file on the hard drives.

Published 3 min readBy Mirush Murataj

Cover of the RecDati guide: Losing a ZFS special vdev: why the whole pool is at risk
The special vdev holds the only copy of the pool's metadata, not a copy of it.

In short

  • The special vdev holds the only copy of the pool's metadata, not a copy of it.
  • Losing it makes the whole pool unimportable, even with every hard drive healthy.
  • Give it at least the same redundancy as the data vdevs, and never remove failed SSDs before imaging them.

What the special vdev stores

A special allocation class vdev receives:

  • the pool's metadata: block pointers, indirect blocks, dnodes, directories, space maps;
  • the deduplication table, unless a separate dedup vdev exists;
  • small file blocks, if the property special_small_blocks is set on a dataset, for example to 64K.

Once written there, these blocks exist only on the special vdev. The hard drive vdevs hold the large data blocks, but without the metadata nobody knows which block belongs to which file.

Why it is not like L2ARC or SLOG

DeviceWhat it holdsPool survives its loss
L2ARC (cache)Copies of data already on the poolYes
SLOG (log)Synchronous writes of the last seconds, also kept in RAMYes, minus the last seconds after a crash
Special vdevThe only copy of metadata and small blocksNo

A special vdev should therefore have at least the redundancy of the rest of the pool. A RAIDZ2 pool of hard drives with a two-way mirror of SSDs as special vdev is less safe than the pool suggests: two SSDs failing end it.

How it fails in practice

  • Two identical SSDs bought together, wearing out at the same rate under the constant small writes of metadata.
  • Consumer SSDs without power-loss protection, damaged by a power cut.
  • A single SSD added "temporarily", which ZFS accepts with a warning.
  • SSDs on a USB adapter or a controller that drops them under load.

What you see

zpool status shows the special vdev FAULTED or UNAVAIL, and the pool SUSPENDED or UNAVAIL. After a reboot, zpool import lists the pool but refuses to import it because a top-level vdev is missing. Unlike a missing cache, there is no option to import without it.

What to do

  1. Do not remove or replace the special vdev SSDs, and do not create a new pool on the hard drives.
  2. Check whether the SSDs are really dead: cables, slots, controller, firmware. A special vdev that comes back makes the pool importable again.
  3. If one side of a mirror still works, import read-only, copy the data off, then rebuild the redundancy.
  4. If all SSDs of the special vdev are dead, have them imaged by a lab. Worn or failed SSDs usually still hold their data.

How the lab recovers it

We image the SSDs at controller or chip level if needed, and image the hard drives. With the special vdev images back, the pool imports as normal on the images. When part of the metadata is missing, older copies are often found in previous transaction groups, and the remaining blocks are mapped by scanning the data vdevs.

Sizing it safely

  • Use the same redundancy level as the data vdevs: a three-way mirror for a RAIDZ2 pool.
  • Choose SSDs with power-loss protection and enough endurance, from different batches.
  • Watch the fill level: when the special vdev is full, new metadata goes to the hard drives, which is safe but slower.
  • Remember that a special vdev cannot be removed from a pool that contains RAIDZ vdevs.

See server data recovery, NAS data recovery and ZFS pool will not import: reading the messages and rewinding safely.

Frequently asked questions

Can I import the pool without the special vdev?

No. It is a top-level vdev containing the only copy of the metadata. Without it, the data on the hard drives cannot be located.

Is a special vdev worth it?

Yes, for pools with many small files or VMs, as long as it has the same redundancy as the rest of the pool.

Can I remove a special vdev later?

Only from pools made entirely of mirrors. With RAIDZ vdevs it cannot be removed.

Official sources and useful links

  • OpenZFS documentation: Official documentation of OpenZFS: zpool and zfs commands, vdev types, pool features and troubleshooting.

Is your data important?

Do not try anything that could make the fault worse. The diagnosis is free and you get a fixed quote before any work starts.

Request a free diagnosis Server data recovery

Device not responding any more? Unplug it and let us take a look.

Get a price