If I have a theoretical pool "tank" 500gb X 4 drives as devices vd{a,b,c,d}
could I pull vdc from the system, image it (bit-wise clone) onto another 500gb disk, and install the clone (lets call this fifth device vde) on the host, would I be able to import this pool normally?
I anticipate zfs may not like that the physical device changed, or may have some other "quirky" behaviors that might make trying to zpool replace ...
more difficult than before.
with a clone of a raidz member,these things I've found don't work
zpool export tank zpool import tank
new device ignored
zpool replace tank vdc /dev/vde
/dev/vde is part of active pool tank
zpool online tank /dev/vde
cannot online /dev/vde no such device in pool
zpool offline tank vdc zpool online tank /dev/vde
cannot online /dev/vde no such device in pool
zpool attach tank vdc vde
/dev/vde is part of active pool cryo
zpool online tank vde
cannot online vde: no such device in pool
zpool import will find the new disk when the original disk is missing
Note: zpool offline tank sdc
, before copying if possible, this helps reduce scrub time&wear. zpool online task sde
after export+import. before export+import, while the device is offline, checksum the copies to ensure no copy defects.
pool: tank
state: ONLINE
scan: resilvered 8K in 0h0m with 0 errors
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
raidz3-0 ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0
sdc ONLINE 0 0 0
sdd ONLINE 0 0 0
# echo 1 >/sys/block/sdc/device/delete
# zpool import -d /dev/disk/by-id/ pool: tank state: ONLINE scan: resilvered 8K in 0h0m with 0 errors config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 raidz3-0 ONLINE 0 0 0 sda ONLINE 0 0 0 sdb ONLINE 0 0 0 sde ONLINE 0 0 0 # clone detected sdd ONLINE 0 0 0
# zpool import -d /dev/disk/by-id/ tank
zpool scrub tank
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.