Clone a drive within FreeNAS

Hi ,
so I am about to migrate a single-drive pool (striped, encrypted) on my FN server to a bigger new drive (again single drive pool, striped encrypted). To avoid a rather slow copy process via SMB across another computer from the old dataset to the new, I thought about using a one-time replication task that copies all the data over to the new drive within FN not requiring an external machine and an SMB bottle-neck.

So the question I have is: Once done can I simply remove the old drive from the NAS and use the new pool with the replicated data as the new “original” and retire the old drive? Or is the replicated set somehow in some other fornat that makes it a “replicant” that can only be used to replicate it back to a fresh drive?

And: Is this the fastest way to do it or is it a bad idea? As I understand replication works on block level, so will the clone have the same encryption keys as the original or do I setup the new drive normally as an excrypted pool and the data will be cloned into that new pool with the new encryption?

(yes, it’s a single drive with a single dataset)

(Hope this made sense).


Replication does not clone drives meaning it will not copy the encryption but it does move data at the block level do the data would be exactly the same on the destination pool. ZFS local replication is probably the fastest.

Thanks Tom, ok that’s great. All I need is a working copy of the old drive that then takes over without the need to copy across the network. As long as the “replicant” works like a normal pool I’m good. Or do I need to replicate it back again for it to work? As in: the replication is just an interim storage that won’t work on it’s own?

Oh, when you said “ZFS local replication” is that what a replication task does or some other command line thing?

Thanks again!

It can be assigned a as a task or run from the command line. It’s just a copy but you will probably need to fix any permissions on the destination once done.

Great, will do. Thanks!