From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC7oM-0002KB-7I for qemu-devel@nongnu.org; Mon, 06 Jul 2015 10:56:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC7oJ-0002ia-1o for qemu-devel@nongnu.org; Mon, 06 Jul 2015 10:55:58 -0400 Received: from indium.canonical.com ([91.189.90.7]:46906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC7oI-0002iM-Rf for qemu-devel@nongnu.org; Mon, 06 Jul 2015 10:55:54 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1ZC7oI-0005bq-AX for ; Mon, 06 Jul 2015 14:55:54 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 4DB402E80C1 for ; Mon, 6 Jul 2015 14:55:54 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 06 Jul 2015 14:46:25 -0000 From: Pierre Schweitzer Sender: bounces@canonical.com References: <20150216100528.10277.20713.malonedeb@chaenomeles.canonical.com> Message-Id: <20150706144625.18783.60043.malone@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1422307] Re: qemu-nbd corrupts files Reply-To: Bug 1422307 <1422307@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Thanks for the extra information. I'll open a new bug report at Ubuntu to get the fix backported to Trusty. Thanks! -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1422307 Title: qemu-nbd corrupts files Status in QEMU: New Bug description: Dear all, On Trusty, in certain situations, try to copy files over a qemu-nbd mounted file system leads to write errors (and thus, file corruption). Here is the last example I tried: -> virtual disk is a VDI disk -> It has only one partition, in FAT Here is my mount process: # modprobe nbd max_part=3D63 # qemu-nbd -c /dev/nbd0 "virtual_disk.vdi" # partprobe /dev/nbd0 # mount /dev/nbd0p1 /tmp/mnt/ Partition is properly mounted at that point: /dev/nbd0p1 on /tmp/mnt type vfat (rw) Now, when I copy a file (rather big, ~28MB): # cp file_to_copy /tmp/mnt/ ; sync # md5sum /tmp/mnt/file_to_copy 2efc9f32e4267782b11d63d2f128a363 /tmp/mnt/file_to_copy # umount /tmp/mnt = # mount /dev/nbd0p1 /tmp/mnt/ # md5sum /tmp/mnt/file_to_copy 42b0a3bf73f704d03ce301716d7654de /tmp/mnt/file_to_copy The first hash was obviously the right one. On a previous attempt I did, I spotted thanks to vbindiff that parts of t= he file were just filed with 0s instead of actual data. It will randomly work after several attempts to write. Version information: # qemu-nbd --version qemu-nbd version 0.0.1 Written by Anthony Liguori. Cheers, To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1422307/+subscriptions