]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: warn about using caching without QEMU knowing
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 26 Dec 2012 22:25:51 +0000 (14:25 -0800)
committerSage Weil <sage@inktank.com>
Fri, 28 Dec 2012 06:03:09 +0000 (22:03 -0800)
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
doc/rbd/qemu-rbd.rst

index d111b39d3edb65b11373820c423af8ce986613c2..29d820c9d44192827a0840192c6242bd506fc045 100644 (file)
@@ -96,7 +96,12 @@ If you have an older version of QEMU, you can set the ``librbd`` cache
 configuration (like any Ceph configuration option) as part of the
 'file' parameter::
 
-    qemu -m 1024 -drive format=raw,file=rbd:data/squeeze:rbd_cache=true
+    qemu -m 1024 -drive format=raw,file=rbd:data/squeeze:rbd_cache=true,cache=writeback
+
+.. important:: If you set rbd_cache=true, you must set cache=writeback
+   or risk data loss. Without cache=writeback, QEMU will not send
+   flush requests to librbd. If QEMU exits uncleanly in this
+   configuration, filesystems on top of rbd can be corrupted.
 
 .. _RBD caching: ../rbd-config-ref/#rbd-cache-config-settings
 
@@ -147,4 +152,4 @@ QEMU command line settings override the Ceph configuration file settings.
 
 .. _QEMU Open Source Processor Emulator: http://wiki.qemu.org/Main_Page
 .. _QEMU Manual: http://wiki.qemu.org/Manual
-.. _RBD Cache: ../rbd-config-ref/
\ No newline at end of file
+.. _RBD Cache: ../rbd-config-ref/