Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
After reading this thread:
http://www.mail-archive.com/qemu-devel@nongnu.org/msg59049.html
It seems like, for extra safety, libvirt's storage driver ought to be calling fdatasync(fd) after creating any storage volumes (particularly if doing volume cloning) to ensure the new volume is committed to underlying storage. It seems like the current code allows for potential data loss to the newly created volume upon host crash.
Alternatively, we might want to use O_DIRECT when initializing storage volumes with explicit data writes.
Version-Release number of selected component (if applicable):
libvirt-0.8.7-11.el6
How reproducible:
Unclear, possible data loss from new storage volume if host crashes immediately after the volume has been copied.
Steps to Reproduce:
1. Create a new raw volume in libvirt, cloning data from an existing volume
2. Kill the host non-gracefully
3. See if data is still present in new volume after reboot.
Actual results:
Expected results:
Additional info:
Comment 2RHEL Program Management
2011-04-04 02:06:05 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Moving to POST:
http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-August/msg00539.html
commit b4cdf3d74920c8c3dc3dbea9a467782238b9f585
Author: Michal Privoznik <mprivozn>
Date: Thu Aug 18 14:40:03 2011 +0200
storage: Flush host cache after write
Although we are flushing cache after some critical writes (e.g.
volume creation), after some others we do not (e.g. volume cloning).
This patch fix this issue. That is for volume cloning, writing
header of logical volume, and storage wipe.
(cherry picked from commit b32f8b19894c2a05e5955056caa45cb4cb0babeb)
Verified with libvirt-0.9.4-5.el6.x86_64, it's fixed. Move it to VERIFIED.
1) Clone a raw volume by libvirt.
# virsh vol-clone foo.img foo-clone.img --pool default
Vol foo-clone.img cloned from foo.img
# qemu-img info /var/lib/libvirt/images/foo-clone.img
image: /var/lib/libvirt/images/foo-clone.img
file format: raw
virtual size: 6.0G (6442450944 bytes)
disk size: 6.0G
# virsh start foo-clone
Domain foo-clone started
2) In guest, copy a file via network, and then executing below command to make host crash immediately.
# echo 1 > /proc/sys/kernel/sysrq
# echo c > /proc/sysrq-trigger
3) Checking copied file which is still present in new volume after reboot.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1513.html