ZFS Replace mirror with single disk

Hello,
I have a couple of drives in a mirror which i would like to replace with a bigger capacity single disk. For redundancy purposes i would like to have copies=2 for all datasets on the new disk.
How can i copy the files from the mirror onto the new drive with copies=2 set for all datasets?
 
First of all: this is a very bad idea. "copies=2" won't give any redundancy, because you're still dealing with the single point of failure which is your harddisk. Once that goes out you'll be loosing all your data if you don't keep proper backups. And the reason I mention this is because many of ZFS' file recovery (and data protection) features rely on multiple drives to be present.

Anyway, the setting you're looking for is one set per filesystem and only affects new data.

So your best option is to simply connect the new disk, fire up a rescue system and then manually set that up with the new required slices. For example; since you also plan to boot from this then you'll need to set up a freebsd-boot and freebsd-zfs slice and bootstrap it accordingly. This guide can definitely help give you some ideas:

https://forums.freebsd.org/threads/installing-freebsd-manually-no-installer.63201/

Then make sure to set -o copies=2 each time you create a new filesystem. After that cp is your friend. It'll be a bit bothersome but that's your best bet here.
 
"copies=2" won't give any redundancy
Well, you get data redundancy, but not disk redundancy.
And the reason I mention this is because many of ZFS' file recovery (and data protection) features rely on multiple drives to be present.
It relies on data redundancy, it doesn't matter if you get this redundancy from copies=2 or by using multiple disks (mirror, RAIDZ, etc).

But besides those minor details, I would agree. Disk redundancy (using more than one disk) is a lot better than a single disk with data redundancy. Disks tend to die when you least expect it and data redundancy isn't going to save you in that case.
 
Back
Top