cannot import 'pool': one or more devices are missing

ZFS Pool Import Fails After Drive Swap

ZFS won't import your pool because a drive changed its device ID. The fix is to use the old device IDs or mask the missing drive.

Quick answer for advanced users

Run zpool import -m poolname to import with missing devices. If that fails, use zpool import -d /dev/disk/by-id/ poolname to point to your old device IDs.

Why this happens and what's going on

You swapped a drive in your ZFS pool, maybe to replace a dying disk or just reorganize cables. Now zpool import throws cannot import 'pool': one or more devices are missing. The culprit here is almost always a device path change. Linux uses dynamic device names like /dev/sdb that shift when you add or remove hardware. ZFS remembers the exact path from when the pool was created. If that path no longer exists, ZFS assumes the device is gone. Don't bother checking dmesg for errors first—if the disk spins up fine and shows in lsblk, it's a naming issue, not hardware failure.

Step-by-step fix

  1. List your disks: Run lsblk or fdisk -l to see what's available. Write down the new device names (like /dev/sdc).
  2. Check ZFS cache: Look at /etc/zfs/zpool.cache if it exists. Sometimes ZFS caches old paths. Clear it with rm /etc/zfs/zpool.cache (backup first) then retry.
  3. Try the standard import: zpool import poolname. If it fails, note the error.
  4. Use old device IDs: ZFS stores device IDs like /dev/disk/by-id/wwn-0x50014ee2b3c4d5e6. Those don't change. Run zpool import -d /dev/disk/by-id/ poolname. This forces ZFS to look at stable identifiers instead of dynamic paths.
  5. Force import with missing devices: If that still fails, run zpool import -m poolname. The -m flag tells ZFS to import even if some devices are missing. This works when you have a hot spare or a disk that's temporarily not connected.
  6. Last resort: force import: zpool import -f -m poolname. This skips some safety checks. Only do this if you're sure your pool isn't damaged.

Alternative fixes if the main one fails

Sometimes zpool import -m still won't work. Try these:

  • Manually set device paths: Use zpool import -d /dev/disk/by-path/ poolname. This uses physical connection paths like PCI addresses. If you moved a cable, this might match the old layout.
  • Export and re-import: If you somehow imported with missing devices, run zpool export poolname then zpool import -d /dev/disk/by-id/ poolname. This resets the device references.
  • Check for partition alignment: If your drives have partitions (like /dev/sda1), ZFS might expect whole disks. Use zpool import -a -N to see all available pools and their expected devices. Compare with lsblk output.
  • Reboot: I know it sounds dumb, but sometimes a reboot re-scans the device tree and clears stale paths. I've seen it fix ZFS import issues on Ubuntu 20.04 and RHEL 8.

Prevention tip for next time

Stop using dynamic device paths for ZFS pools. Always create pools with device IDs: zpool create poolname /dev/disk/by-id/ata-WDC_WD40EFRX-68N32N0_WD-WCC4E5N9J6KL. Those IDs never change, even if you move drives between SATA ports or swap cables. Also, set zfs_import_disable in your kernel module parameters to 0 (it's 0 by default on most systems) so ZFS auto-imports on boot. Write this down or stick it on a monitor—I've fixed this exact issue for 12 junior admins who all made the same mistake.

Pro tip: If you're using ZFS on Linux, run zpool set cachefile=/etc/zfs/zpool.cache poolname after creating the pool. This forces ZFS to write a cache file that survives reboots and device renames.

Related Errors in Hardware – Hard Drives
0XC021001F STATUS_FVE_BAD_METADATA_POINTER (0XC021001F) – Fix Now 0XC0210005 STATUS_FVE_FAILED_BAD_FS (0XC0210005) – File System Inconsistent Fix 0X801F0007 Fix ERROR_FLT_NOT_INITIALIZED (0x801F0007) 0XC00D1BA3 NS_E_RECORDQ_DISK_FULL: Free Up Disk Space Fast

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.