[DRBD-user] cronjob for verify

Veit Wahlich cru.lists at zodia.de
Tue Oct 10 10:19:23 CEST 2017

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Hi Jan,

Am Dienstag, den 10.10.2017, 13:11 +1300 schrieb Jan Bakuwel:
> Thanks for that. Must say that possibility has escaped my attention so 
> far. I'm using DRBD in combination with Xen and LVM for VMs so I assume 
> O_DIRECT is in play here. Any suggestions where to go from here? A 
> search for DRBD, LVM, Xen and O_DIRECT doesn't seem to bring up any 
> results discussing this issue.

qemu uses O_DIRECT for all caching modes except for "writethrough" and
"writeback", so both modes are safe to be used with DRBD to prevent OOS

However it is controversal whether "writeback" is actually
migration-safe in shared storage or synchronized storage environments as
some people assume qemu to not properly sync data to disk before handing
over to the new host. However (some versions of) libvirt will also
report "writethrough" as unsafe for migration, although it has been
proven otherwise.
I have not analyzed possible issues with qemu's "writeback" cache by
myself, as I regard it unsafe anyway (as it means to trust the guest OS
to properly do syncs). Do hardware write back caching with BBU on the
host system instead.

The caching mode can be set using the "cache=" attribute within qemu's
"-drive" parameters, so you can check which cache mode is currently used
by examining the command line parameters of running qemu processes.
Where to configure the cache mode depends on what invokes qemu in your
environment. Some environments use cache mode "none" as default if the
VM's backing storage is a block device (such as a LVM LV) to avoid
If you are using libvirt, you can add/change the "cache" attribute of
the "driver" subnode within the "disk" node in the domains' XML

Best regards,
// Veit

More information about the drbd-user mailing list