I'm running a raidz2 pool on Linux Mint 19.x. I'm seeing the following in the pool status:

david@Media:~$ zpool status 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: resilvered 1.27T in 8h15m with 0 errors on Tue Nov 26 09:53:36 2019 config:

NAME                      STATE     READ WRITE CKSUM
data                      DEGRADED     0     0     0
  raidz2-0                DEGRADED     0     0     0
    sdb                   ONLINE       0     0     0
    sdc                   ONLINE       0     0     0
    sdd                   ONLINE       0     0     0
    sde                   ONLINE       0     0     0
    10841317365380570418  UNAVAIL      0     0     0  was /dev/sdf1
    sdh                   ONLINE       0     0     0
    sdi                   ONLINE       0     0     0
    sdj                   ONLINE       0     0     0

If I look at the disks there is no longer a drive at /dev/sdf but there is one at /dev/sdg. I don't think I want to run the "replace" command mentioned in the status as my understanding that is destructive and will resliver the data onto sdg which I believe is the missing sdf.

How can I swap out sdg for sdf or cachieve something similar without destroying the pool data on sdg?

I looked around for information on this message but wasn't finding much useful or that I could understand. I saw references to mdadm, but that does not seem to be my problem;

david@Media:~$ cat /proc/mdstat Personalities : unused devices:

1 Answer 1


You should avoid using generic SCSI /dev/sdX names for your ZFS pool devices because they can change across boots. I prefer using entries from /dev/disk/by-id

In this case, you can probably replace the missing disk with the new device location:

zpool replace data 10841317365380570418 sdg
  • 1
    Thanks. As a beginner with ZFS, I was just following easy tutorials which don't always follow best practices. I was wondering about the sdX names changing. I did; "zpool export [zpoolname]" then "zpool import -d /dev/disk/by-id [zpoolname]" which seems to have gotten the disk back in the pool and given me disk ids now in zpool status, but not sure if that will stick on reboot.
    – Aladdin
    Dec 2, 2019 at 6:52
  • That works too!
    – ewwhite
    Dec 2, 2019 at 7:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .