Lars

New About Yours API Help
2.3 KB, Plain text
Hi guys,

am a listener of the show since day 1 and have asked questions before. Currently I am setting up systems with bhyve and ZFS and came across the following:
I am running bhyve on an up to date FreeBSD 11.0 system with ZFS. I am using vm-bhyve as my bhyve manager. The system is on its own pool (2 disk mirror) and the VMs are on another pool (also 2 disk mirror).
vm-bhyve uses ZVOLs for the virtual machine disks. One of my VMs has a second disk for the data (VM OS is also FreeBSD). I can perfectly make a snapshot of that data disk on my bhyve system. But then ... the ZFS Mastery book states that you can mount a snapshot but not in this case, probably as this is a ZVOL? I've also tried to send and receive a snapshot to a 'normal' local dataset on the bhyve system itself, but then I get all sorts of permission errors (although the 'zfs send ... | zfs receive ...' was carried out as root).

Does what I want make any sense? I thought that using snapshots of my VM data disk is a good way to make 'backups' of my data. But it seems that I cannot access the data of the snapshot in any way! Am I overlooking something here or is this just the wrong method? I want to be able to get back any files if deleted accidentally. Or should I use NFS to a ZFS volume/dataset on another system (i.e. a FreeNAS box) for the data of this VM?

Thank you in advance for any feedback!

With kind regards,
Lars from the Netherlands

--- Some time later ---

I have figured it out! I also learned that my VM using the data disk has to be switched off, to make a proper snapshot! By proper I mean one that can be rolled back. So the sequence is:
1) switch of the VM
2) make the snapshot
3) switch the VM back on

And to be able to roll back a snashot of the data disk you have to:
1) switch off the VM
2) rollback the snashot of the data disk
3) switch the VM back on

Nice lessons learned here. This involves quit some steps if you want to automate this. So I will also try to have a data disk on a FreeNAS system accessed through NFS. And then do the snapshots on the FreeNAS system. I am not sure but I guess in that case the VM does not have to be switched of to make the snapshots and do the rollbacks (as the dataset resides on another system)???

Thank you in advance.

With kind regards,
Lars
Pasted 1┬ámonth ago — Expires in 334 days
URL: http://dpaste.com/0MM37NA