...and the hardware specs matter here why?Hardware specs and freenas version required for every new thread.
I don't care. More often than not it changes the advice we give. It's also part of the rules for being here and playing nice....and the hardware specs matter here why?
Technically true, but the cool thing about a mirror is that if the drive you leave installed fails during the resilver of the new drive, the drive you pulled has all the data.it puts your data at risk
Technically true, but the cool thing about a mirror is that if the drive you leave installed fails during the resilver of the new drive, the drive you pulled has all the data.
No, I haven't actually tested this theory in practice, but I'm confident. I won't be testing it today, but if/when I do I'll post confirmation.Are you sure you can actually re-online the offlined drive to recover the data?
zpool import
with suitable options.I was reminded of that just the other day when browsing the zpool docs. What an awesome way to clone or backup a poolsplit the mirror
No, I haven't actually tested this theory in practice, but I'm confident. I won't be testing it today, but if/when I do I'll post confirmation.
EDIT: I assume the process would be azpool import
with suitable options.
I was reminded of that just the other day when browsing the zpool docs. What an awesome way to clone or backup a pool![]()
zpool split
, and as a side effect, you now have a backup of the original pool.Are you sayingyou can't convert a dual mirror to stripe the same way
zpool detach
doesn't work for a 2-way mirror? That's not how I read the docs.Are you sayingzpool detach
doesn't work for a 2-way mirror? That's not how I read the docs.
You can use thezpool detach
command to detach a device from a mirrored storage pool. However, this operation fails if no other valid replicas of the data exist.
You can use thezpool split
command to detach disks from a mirrored ZFS storage pool to create a new pool with one of the detached disks. The new pool will have identical contents to the original mirrored ZFS storage pool.
root@rhea:~ # mkdir test
root@rhea:~ # cd test
root@rhea:~/test # dd if=/dev/zero of=slice1 bs=1m count=100
root@rhea:~/test # dd if=/dev/zero of=slice2 bs=1m count=100
root@rhea:~/test # dd if=/dev/zero of=slice3 bs=1m count=100
root@rhea:~/test # ls -alt
total 5
-rw-r--r-- 1 root wheel 104857600 May 11 12:43 slice3
drwxr-xr-x 2 root wheel 5 May 11 12:43 .
-rw-r--r-- 1 root wheel 104857600 May 11 12:43 slice2
-rw-r--r-- 1 root wheel 104857600 May 11 12:43 slice1
drwxr-xr-x 4 root wheel 16 May 11 12:40 ..
root@rhea:~/test # zpool create testpool /root/test/slice1
root@rhea:~/test # zpool status testpool
pool: testpool
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
testpool ONLINE 0 0 0
/root/test/slice1 ONLINE 0 0 0
errors: No known data errors
root@rhea:~/test # zpool attach testpool /root/test/slice1 /root/test/slice2
root@rhea:~/test # zpool status testpool
pool: testpool
state: ONLINE
scan: resilvered 268K in 0h0m with 0 errors on Thu May 11 12:45:01 2017
config:
NAME STATE READ WRITE CKSUM
testpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/root/test/slice1 ONLINE 0 0 0
/root/test/slice2 ONLINE 0 0 0
errors: No known data errors
root@rhea:~/test # zpool attach testpool /root/test/slice1 /root/test/slice3
root@rhea:~/test # zpool status testpool
pool: testpool
state: ONLINE
scan: resilvered 268K in 0h0m with 0 errors on Thu May 11 12:45:09 2017
config:
NAME STATE READ WRITE CKSUM
testpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/root/test/slice1 ONLINE 0 0 0
/root/test/slice2 ONLINE 0 0 0
/root/test/slice3 ONLINE 0 0 0
errors: No known data errors
root@rhea:~/test # zpool detach testpool /root/test/slice3
root@rhea:~/test # zpool status testpool
pool: testpool
state: ONLINE
scan: resilvered 268K in 0h0m with 0 errors on Thu May 11 12:45:09 2017
config:
NAME STATE READ WRITE CKSUM
testpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
/root/test/slice1 ONLINE 0 0 0
/root/test/slice2 ONLINE 0 0 0
errors: No known data errors
root@rhea:~/test # zpool detach testpool /root/test/slice2
root@rhea:~/test # zpool status testpool
pool: testpool
state: ONLINE
scan: resilvered 268K in 0h0m with 0 errors on Thu May 11 12:45:09 2017
config:
NAME STATE READ WRITE CKSUM
testpool ONLINE 0 0 0
/root/test/slice1 ONLINE 0 0 0
errors: No known data errors
root@rhea:~/test # zpool destroy testpool
root@rhea:~/test # cd ..
root@rhea:~ # rm -rf test
root@rhea:~ #
Ah, well that is a point after all.Technically true, but the cool thing about a mirror is that if the drive you leave installed fails during the resilver of the new drive, the drive you pulled has all the data.
Just did some testing:I'll post confirmation
zpool replace
of disk B with a new disk C zpool import
. Connecting A and B was no better. Connecting A and C, followed by zpool clear
got the pool back, but after resilver, it was empty photorec
on B would be a recovery option.