2013-05-03 22:25:37 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2017-07-27 01:01:25 +08:00
|
|
|
<!DOCTYPE html>
|
2013-05-03 22:25:37 +08:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2011-06-24 20:50:08 +08:00
|
|
|
<body>
|
2015-02-14 01:02:44 +08:00
|
|
|
<h1>Virtual machine lock manager</h1>
|
2011-06-24 20:50:08 +08:00
|
|
|
|
|
|
|
<ul id="toc"></ul>
|
|
|
|
|
|
|
|
<p>
|
2015-02-14 01:02:44 +08:00
|
|
|
Libvirt includes a framework for ensuring mutual exclusion
|
|
|
|
between virtual machines using host resources. Typically
|
|
|
|
this is used to prevent two VM processes from having concurrent
|
|
|
|
write access to the same disk image, as this would result in
|
|
|
|
data corruption if the guest was not using a cluster
|
|
|
|
aware filesystem.
|
2011-06-24 20:50:08 +08:00
|
|
|
</p>
|
|
|
|
|
2017-07-26 22:52:42 +08:00
|
|
|
<h2><a id="plugins">Lock manager plugins</a></h2>
|
2011-06-24 20:50:08 +08:00
|
|
|
|
|
|
|
<p>
|
2015-02-14 01:02:44 +08:00
|
|
|
The lock manager framework has a pluggable architecture,
|
|
|
|
to allow different locking technologies to be used.
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<dl>
|
2016-04-21 21:23:56 +08:00
|
|
|
<dt><code>nop</code></dt>
|
2015-02-14 01:02:44 +08:00
|
|
|
<dd>This is a "no op" implementation which does absolutely
|
|
|
|
nothing. This can be used if mutual exclusion between
|
|
|
|
virtual machines is not required, or if it is being
|
|
|
|
solved at another level in the management stack.</dd>
|
2016-04-21 21:23:56 +08:00
|
|
|
<dt><code><a href="locking-lockd.html">lockd</a></code></dt>
|
2015-02-14 01:02:44 +08:00
|
|
|
<dd>This is the current preferred implementation shipped
|
|
|
|
with libvirt. It uses the <code>virtlockd</code> daemon
|
|
|
|
to manage locks using the POSIX fcntl() advisory locking
|
|
|
|
capability. As such it requires a shared filesystem of
|
|
|
|
some kind be accessible to all hosts which share the
|
|
|
|
same image storage.</dd>
|
2016-04-21 21:23:56 +08:00
|
|
|
<dt><code><a href="locking-sanlock.html">sanlock</a></code></dt>
|
2015-02-14 01:02:44 +08:00
|
|
|
<dd>This is an alternative implementation preferred by
|
|
|
|
the oVirt project. It uses a disk paxos algorithm for
|
|
|
|
maintaining continuously renewed leases. In the default
|
|
|
|
setup it requires some shared filesystem, but it is
|
|
|
|
possible to use it in a manual mode where the management
|
|
|
|
application creates leases in SAN storage volumes.
|
|
|
|
</dd>
|
|
|
|
</dl>
|
2011-06-24 20:50:08 +08:00
|
|
|
</body>
|
|
|
|
</html>
|