[OmniOS-discuss] Auto snapshots?

Sašo Kiselkov skiselkov.ml at gmail.com
Tue Apr 23 11:12:45 EDT 2013


On 04/23/2013 04:40 PM, Eric Sproul wrote:
> Hi Dan,
> First, welcome.  :)  Your question does come up from time to time.
> There isn't a "standard zfs auto-snapshot service" outside of Oracle
> Solaris.  That is, it's not a baked-in feature of ZFS, but a service
> added on top.  Back in OpenSolaris there was Time Slider, but that was
> a desktop-oriented feature with GNOME integration, and isn't suitable
> for server deployments.
> 
> But beyond those specifics, in the case where ZFS is providing a
> backing store for what are seen as block devices by the ESXi guests,
> you probably don't want blind ZFS snapshotting for the simple reason
> that ZFS alone cannot ensure that the on-disk state of a given virtual
> disk is consistent from the guest's viewpoint.  ZFS will happily
> snapshot the filesystem on which the virtual disk file resides, but if
> there are in-flight transactions in the guest to the filesystem backed
> by that virtual disk file, the state represented by the snapshot may
> be inconsistent.  You need some way to coordinate quiescing the guests
> whose storage sits on the filesystem you want to snapshot, to make
> sure their buffer caches are flushed out prior to the snapshot.  Maybe
> someone on the list who does this can pipe up with specific techniques
> in the VMware universe.

Hi Eric,

Quiescing clients is something that's been kicking around my head for a
while and I'm not sure ZFS per-se needs it. The canonical example of a
customer who needs transactional consistency are databases. Those
already implement their own redo logs, so all one needs to ensure is
that a snapshot is taken in between atomic updates by the database (e.g.
when committing a redo log entry). This should, in theory, align well
with ZFS transaction groups - a txg is either in a snapshot completely,
or not at all. So even if the full DB transaction (think BEGIN/COMMIT)
is partly split up between ZFS txg's, it's the COMMIT step that must be
atomic, and as far as I can see it, it is.

If not, where did I go wrong?

Cheers,
--
Saso


More information about the OmniOS-discuss mailing list