[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [linux-lvm] Snapshots and disk re-use



On Thu, 24 Feb 2011, Nataraj wrote:

> One other thing that wasn't mentioned here.... As far as I understand,
> if these are lvms on the host and the snapshots are being taken on the
> host, there is no guaranteed integrity of the filesystems unless you
> shutdown the guest while the snapshot is taken.
> 
> It's too bad they don't implement a system call that could do something
> like sync filesystem and sleep until I tell you to continue.  This would
> be perfect for snapshot backups of virtual hosts.

The hosting service backup script can attempt to send a message to 
the VM on a network port before taking the snapshot.  If the VM
accepts the connection and implements the handshake API, it will respond with
a "WAIT A SEC", tell databases to sync and suspend writes, then
tell the host to "GO AHEAD".  The host then takes the snapshot and
tells the VM, "ALL DONE, CARRY ON".

This network API ought to be standardized.  In fact, I am just about
to write this API for a client to reduce their backup window from
6 minutes to a few seconds.  If I am reinventing the wheel here,
please let me know!  If not, I'll share here.  Code will likely be python.

For many applications, filesystem journalling is sufficient for snapshots
to be useful without further involvement.  But when database are involved,
you often need the handshake.

-- 
	      Stuart D. Gathman <stuart bmsi com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]