Rudd-O/zfs-tools — pull request #11 by tesujimath (2014-09-24 21:09:23+00:00)
Title: zlock addition to zbackup

I added a locking script called zlock, which is used by zbackup to acquire a lock on a ZFS filesystem. This prevents concurrent replication. The point is, zbackup is usually invoked from cron, say nightly, but the initial replication can take many days to complete. This new function inhibits subsequent replications by zbackup, until the initial one is complete. An additional benefit is that zlock can be called by hand, to prevent zbackup replication from occurring. for example if it is desired to migrate the replicas from one replica server to another.

Note as per the README, zlock in fact does nothing at the level of the ZFS filesystem; it merely records a lockfile in /var/lib/zfs-tools/zlock which is checked by other invocations of zlock.