Independent copy of a zvol

Status
Not open for further replies.

Goose

Dabbler
Joined
Oct 4, 2014
Messages
25
This is going to sound a bit odd but I'm not actually sure of the question I need to ask! I have read dozens of articles on copy, clone, send, receive and have tried several but I'm obviously missing something. Let me explain...

Running FreeNAS-11.0-U4 with some shiny new VMs in which I have base builds of Windows 10 and some other OSes. I'm thinking about the Windows 10 VM for this. I created a new zvol, attached it as DISK to the VM, added a ISO image of Windows 10 and booted it. After a few hundred gigs of patches now I have a Fall Update Windows 10 base image. All good...

Now I want a copy of it, a copy that if I delete the original then I still have a copy. To me this takes me back to linked clones in VMWare which maybe where the problem stems from. If I snapshot Base10 and then clone it to a zvol then it seems to work but the sizes are all wrong. Base10 is 9.49G USED and 9.49G REFER, Clone10 is 8K USED and 9.49G REFER. That says to me that I have linked clone rather than a clone. Is that what I have or has magic happened and the Clone10 is just as real as Base10?

If it is linked then do I need to worry as there is yet more magic going on that means all the thinking about storage is being done for me? Both Base10 and Clone10 will be in permanent use so will, I expect, diverge quite a lot over time. Should I worry about the core of Base10 being so irrelevant to Clone10 in X years time that it actually gets in the way?

If I should worry then should I be looking at dd to copy from one sparse zvol to another or is that really the job for zfs send? I can't get either to work properly which is why I thought I'd stop and come and ask!

Lastly I read that v11.x will have a clone VM capability, is this what I need or is that the same as what I have done so far manually?

Thanks for getting this far and any pointers!

Cheers,

Goose
 

bigphil

Patron
Joined
Jan 30, 2014
Messages
486
If you want to split a clone from its parent snapshot, you'd use the "zfs promote" command.
 
Last edited:

Goose

Dabbler
Joined
Oct 4, 2014
Messages
25
Thank you! So easy once you know what to look for!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194

Goose

Dabbler
Joined
Oct 4, 2014
Messages
25
A quick closing question here as I revisited the dd approach I had read elsewhere and that worked. I assume that "promote" does something similar to a dd of the clone to a new one. Perhaps not dd but you know what I mean...
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Not at all, zfs promote is a metadata operation, so it has different effects.
 
Status
Not open for further replies.
Top