2

In the example below, how can the devices in the second mirror be changed so they they reference the /dev/disk/by-id instead of /dev/sdX?

user@pc:~$ sudo zpool status
  pool: storage
 state: ONLINE
  scan: scrub repaired 0 in 8h30m with 0 errors on Sun May 28 08:54:48 2017
config:

    NAME                                  STATE     READ WRITE CKSUM
    storage                               ONLINE       0     0     0
      mirror-0                            ONLINE       0     0     0
        ata-ST2000AS0002-1NA12Z_Z840MHWP  ONLINE       0     0     0
        ata-ST2000AS0002-1NA12Z_Z840MHTQ  ONLINE       0     0     0
      mirror-1                            ONLINE       0     0     0
        sdd                               ONLINE       0     0     0
        sde                               ONLINE       0     0     0
  • Did you manage to change the vdevs in /dev/sdx to /dev/disk/by-id/.. ? – satch_boogie Apr 4 '18 at 4:56
0

I'm not familiar with ZFS on linux (I'm guessing this is a problem peculiar to linux, Solaris and FreeBSD wouldn't have that kind of device name schizophrenia...) but you might try detaching and reattaching the drives as disk-by-id (be sure to give each time to fully resilver)

zpool detach mirror-1 sdd
zpool attach mirror-1 /dev/disk/sdd-by-id
<wait until zpool status shows it's rebuilt...>

and so on...

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.