On 08/09/2012 09:20 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The current default QEMU lock manager is the 'nop' lock manager,
which obviously does not perform any locking. The new virtlockd
daemon is able to work out of the box with zero configuration
in single-host only mode. Enable this as the default lock manager
for all QEMU guests
Question - can virtlockd also be made to work in multi-host mode for
shared file systems that support fcntl locking, possibly by adding some
non-default configuration?
* src/qemu/qemu.conf: Update docs for lock_driver parameter
* src/qemu/qemu_conf.c: Change default lock manager to 'lockd'
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu.conf | 17 ++++++++++-------
src/qemu/qemu_conf.c | 2 +-
src/qemu/test_libvirtd_qemu.aug.in | 2 +-
3 files changed, 12 insertions(+), 9 deletions(-)
Missing documentation in docs/locking.html.in on how to use virtlockd
instead of sanlock, and any tips on setting up multi-box environments
(if those are indeed possible).
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index ed4683c..b232762 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -318,14 +318,17 @@
#
#allow_disk_format_probing = 1
-
-# To enable 'Sanlock' project based locking of the file
-# content (to prevent two VMs writing to the same
-# disk), uncomment this
+# By default the QEMU driver talks to the 'virtlockd'
Is the config setting 'virtlockd'...
+# daemon to acquire exclusive locks for all guest disk
+# images associated with a running VM.
#
-#lock_manager = "sanlock"
-
-
+# To revert to behaviour of previous releases which did
+# not acquire any locks, set this to 'nop'.
+#
+# To enable use of the external 'sanlock' locking
+# daemon, change this to 'sanlock'.
+#
+#lock_manager = "lockd"
...or 'lockd'? This needs to be consistent. Maybe call out:
This defaults to 'lockd' to use the virtlockd(8) daemon...
Hmm, that means an earlier patch is also missing a virtlockd.8 man page.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org