On Fri, July 16, 2010 08:39, Richard L. Hamilton wrote:
>> > It'd be handy to have a mechanism where
>> applications could register for
>> > snapshot notifications. When one is about to
>> happen, they could be told
>> > about it and do what they need to do. Once all the
>> applications have
>> > acknowledged the snapshot alert--and/or after a
>> pre-set timeout--the file
>> > system would create the snapshot, and then notify
>> the applications that
>> > it's done.
>> >
>> Why would an application need to be notified? I think
>> you're under the
>> misconception that something happens when a ZFS
>> snapshot is taken.
>> NOTHING happens when a snapshot is taken (OK, well,
>> there is the
>> snapshot reference name created). Blocks aren't moved
>> around, we don't
>> copy anything, etc. Applications have no need to "do
>> anything" before a
>> snapshot it taken.
>
> It would be nice to have applications request to be notified
> before a snapshot is taken, and when that have requested
> notification have acknowledged that they're ready, the snapshot
> would be taken; and then another notification sent that it was
> taken.  Prior to indicating they were ready, the apps could
> have achieved a logically consistent on disk state.  That
> would eliminate the need for (for example) separate database
> backups, if you could have a snapshot with the database on it
> in a consistent state.

Any software dependent on cooperating with the filesystem to ensure that
the files are consistent in a snapshot fails the cord-yank test (which is
equivalent to the "processor explodes" test and the "power supply bursts
into flames" test and the "disk drive shatters" test and so forth).  It
can't survive unavoidable physical-world events.

Conversely, any scheme for a program writing to its files that PASSES
those tests will be fine with arbitrary snapshots, too.

For that matter, remember that the "snapshot" may be taken on a zfs server
on another continent which is making the storage available via iScsi;
there's currently no notification channel to tell the software the
snapshot is happening.

-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to