Received: from eggs.gnu.org ([2001:4830:134:3::10]:55204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XINy9-0003DW-K2 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 16:19:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XINy4-0000xW-P2 for qemu-devel@nongnu.org; Fri, 15 Aug 2014 16:19:25 -0400 Received: from xes-mad.com ([216.165.139.218]:52177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XINy4-0000xS-KK for qemu-devel@nongnu.org; Fri, 15 Aug 2014 16:19:20 -0400 Received: from zimbra.xes-mad.com (zimbra.xes-mad.com [10.52.0.127]) by xes-mad.com (8.13.8/8.13.8) with ESMTP id s7FKIGLk007402 for ; Fri, 15 Aug 2014 15:18:16 -0500 Date: Fri, 15 Aug 2014 15:18:15 -0500 (CDT) From: Andrew Martin Message-ID: <985931631.51123.1408133895894.JavaMail.zimbra@xes-inc.com> In-Reply-To: <1009168463.49610.1408133034828.JavaMail.zimbra@xes-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Using cache=writeback safely on qemu 1.4.0 and later List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello, I am running several qemu-kvm VM servers on Ubuntu 12.04 with qemu-kvm 1.4.0. Most of the guests are also running Ubuntu 12.04. I am using qcow2 disk images with the virtio driver in almost all cases, and am storing the disks on two types of storage devices: * a shared NFS server mounted on each host * local ext4 filesystems on each host (on top of an md RAID1 of HDDs) It seems like the consensus for NFS is to use cache=none in order to support live migration between hosts. For local ext4 filesystems, I see from this message and elsewhere that cache=writeback is now the default disk cache mode, and is safe on ext4: http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02689.html All of the hosts and guests are using ext4 (with the default data=ordered,barrier). Thus it seems probable that the kernel (3.2.x or newer) should support flushing correctly? Is there a way to check in the guest is utilizing WCE (or any other required components) correctly? I recently experienced UPS failure on several hosts which caused a hard shutdown. After restarting, 3 of the guests had corruption on their disks and required a fairly long fsck to fix. Afterwards, data that had been written to the disks several hours before the crash was corrupted, which makes me think that it was never fsync()-ed to the non-volatile storage. Is it safe in this setup to use cache=writeback? Or, should I use cache=writethrough instead? Thanks, Andrew Martin