Created a new ZVol from snapshot, safe to delete?

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I have made a new ZVol from a snapshot of another ZVol.

My old ZVol was an 80GB volume for Ubuntu Desktop VM
My new ZVol is an 80GB volume for Ubuntu Server VM

I can promote the dataset, so I'm just not sure what's safe here. I get the impression they're tied to one and other but I'm not sure how.
I don't need the old one at all. If I delete it, will it mess up the new one somehow?

I'm really happy the new one is only using 20GB of space vs the 40GB of the other.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
So if that picture isn't clear.

The UbuntuServer Volume was created by cloning a snapshot of UbuntuVM
What happens when I promote it? If I delete UbuntuVM will it break anything? I got the impression they're tied to one and other?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
IMHO you should copy the snapshot via zfs send | zfs receive for VM disk images. The snapshots (source and destination) can be deleted after that. You get a complete independent copy.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I did it specifically this way, because I've had ridiculous trouble creating a sparse 80GB volume, with high compression which works properly.

I don't know what I'm doing wrong, if it's TrueNAS or Bhyve or Ubuntu or me missing something but I've had wild issues, I just couldn't install my OS without it saying '0KB can't use this disk" OR taking all 80GB at once.
Now (as per the picture) it's fantastic, it's only using 20GB (about 35GB on the VM) all highly compressed.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
zfs inherit -S refreservation your-pool/path/to/your-zvol

Zvols are "fat" by default, i.e. the volume size is reserved in ZFS. To get the equivalent of a VMware sparse disk you need to remove the reservation. That is the refreservation parameter above.
 
Top