在下面的示例中,如何更改第二个镜像中的设备,以便它们引用/dev/disk/by-id而不是/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
我不熟悉Linux上的ZFS(我猜这是linux特有的一个问题,Solaris和FreeBSD不会有那种types的设备名称精神分裂症…),但是你可能会尝试分离和重新连接驱动器为磁盘(确保每一次都完全重复)
zpool detach mirror-1 sdd zpool attach mirror-1 /dev/disk/sdd-by-id <wait until zpool status shows it's rebuilt...>
等等…