I have a 2-drive ZFS mirror pool on Ubuntu. The drives for the pool were at /dev/sda and /dev/sdb. For various reasons, I had to physically move the drive at /dev/sda to a different slot in my server, so Ubuntu now recognizes it as being at /dev/sdc. It seems that, because of this, the zfs pool no longer recognizes that drive and hence marks my pool as degraded. zpool status -x yields

  pool: data
  state: DEGRADED
  status: One or more devices could not be used because the label is 
          missing or invalid.  Sufficient replicas exist for the pool 
          to continue functioning in a degraded state.
  action: Replace the device using 'zpool replace'.
  see: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: scrub repaired 0 in 12h56m with 0 errors on Sun Apr  9 
        13:20:15 2017

    NAME                     STATE     READ WRITE CKSUM
    data                     DEGRADED     0     0     0
      mirror-0               DEGRADED     0     0     0
        9406053825076090209  UNAVAIL      0     0     0  was /dev/sda1
        sdb                  ONLINE       0     0     0

I tried running some commands I found online involving zpool replace, but it seems to complain when I do this because it sees that /dev/sdc (/dev/sdc1) is a ZFS disk (partition).

Ideally I'd like to just tell ZFS that the missing drive is at /dev/sdc -- that should get my pool back to a pristine state. Another idea might be to tell Linux to swap the labels /dev/sda and /dev/sdc -- don't know if that's a crazy idea or not. Worst case, maybe there is some zpool replace command that more or less wipes what's on /dev/sdc and rebuilds the mirror on that disk from scratch. Would really appreciate any advice on what's possible/recommend -- thanks!!


It's important to use /dev/disk-by-id/ names instead of RAW SCSI names because something as simple as a USB disk insertion could cause the devices to be renamed.

Please see: Why did rebooting cause one side of my ZFS mirror to become UNAVAIL?

You may be able to zpool export data followed by zpool import data.

I'm also concerned there's an sda1. You should not have partitions when the other side of the mirror is /dev/sdb.

  • Running zpool export data then zpool import data worked! Thank you! Now to find out how to switch from using SCSI names to disk-by-id names... – davewy Apr 29 '17 at 0:42
  • You may not have to now. Do a zpool status -v – ewwhite Apr 29 '17 at 1:38
  • Now shows sdb and sdc for the names of the drives in the pool... – davewy Apr 29 '17 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.