[OpenIndiana-discuss] ZFS Snapshot question

Jan Owoc jsowoc at gmail.com
Thu Aug 2 20:59:13 UTC 2012


Hi Mark,

On Thu, Aug 2, 2012 at 2:53 PM, Mark Creamer <whitetr6 at gmail.com> wrote:
> What I should have done (I think) is set up the zfs file system for each VM
> at the level below ../vmimages, that is:  "zfs create
> datastore/vmimages/server1". That way, auto-snapshot would be creating
> snapshots for each VM, rather than for the entire ../vmimages file system
> each time.
>
> So, is there an easy way to make a separate zfs file system for each of the
> existing directories below ../vmimages? I am able to take the VM guests
> down to do this as needed.

Yes, zfs filesystems can be nested as many times as you like. On a
single pool, you could have "/", then "/home", then "/home/mark", and
then even create subfilesystems for different kinds of data
(compressible data, data that needs copies=2, etc.).

Having said that, I believe they need to be mounted in empty
directories, so you'd have to do:
# mv datastore/vmimages/server1 datastore/vmimages/server1.bak
# zfs create -o [options here] datastore/vmimages/server1
# cp -a datastore/vmimages/server1.bak/* datastore/vmimages/server1
# rm -r datastore/vmimages/server1.bak

Jan



More information about the OpenIndiana-discuss mailing list