Bug 1598119
Summary: | "share-rw=on" does not work for luks format image | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Xueqiang Wei <xuwei> | |
Component: | qemu-kvm-rhev | Assignee: | Hanna Czenczek <hreitz> | |
Status: | CLOSED ERRATA | QA Contact: | Xueqiang Wei <xuwei> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 7.6 | CC: | aliang, berrange, chayang, coli, juzhang, ngu, timao, virt-maint, yhong | |
Target Milestone: | rc | Keywords: | Reopened | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | qemu-kvm-rhev-2.12.0-22.el7 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1629701 (view as bug list) | Environment: | ||
Last Closed: | 2019-08-22 09:18:46 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1629701, 1649160, 1651787 |
Description
Xueqiang Wei
2018-07-04 12:06:51 UTC
luks is a format driver in QEMU. So it has the same restrictions as any other format like qcow2: share-rw DOES NOT allow two VMs to share it. Re-opening, as there is no reason why sharing could not be made to work. LUKS is a format driver, but all the metadata in the LUKS header region is readonly, at least by default. So it is reasonable to expect to be able to have multiple writers, provided the driver beneath lucks supports it. In the future, we will allow some live changes to the header regions, such as adding/removing key slots. In such a cases, we would need to require exclusive access during those operations, but that shouldn't block sharing during normal use. Dan, does that mean if I use "locking=off" on the "driver beneath luks", it is guaranteed safe to write to the image from two VMs, and no corruption can happen with today's QEMU luks driver? Or is there additional work needed on the driver to handle concurrent writes? Yes, /at this point in time/ it should be safe to use locking=off on the driver beneath luks. This will change when we later provide the ability to update keyslots on the fly, but we can worry about that when we get there. Addressed by below commit from QEMU 3.1: commit 497da8236ab2663a8108858ba7ea59aac21c5fe6 Author: Fam Zheng <famz> Date: Tue Aug 14 15:25:51 2018 +0800 luks: Allow share-rw=on Format drivers such as qcow2 don't allow sharing the same image between two QEMU instances in order to prevent image corruptions, because of metadata cache. LUKS driver don't modify metadata except for when creating image, so it is safe to relax the permission. This makes share-rw=on property work on virtual devices. Suggested-by: Daniel P. Berrangé <berrange> Signed-off-by: Fam Zheng <famz> Reviewed-by: Daniel P. Berrangé <berrange> Signed-off-by: Kevin Wolf <kwolf> (In reply to Fam Zheng from comment #7) > Addressed by below commit from QEMU 3.1: > > commit 497da8236ab2663a8108858ba7ea59aac21c5fe6 > Author: Fam Zheng <famz> > Date: Tue Aug 14 15:25:51 2018 +0800 > > luks: Allow share-rw=on > > Format drivers such as qcow2 don't allow sharing the same image between > two QEMU instances in order to prevent image corruptions, because of > metadata cache. LUKS driver don't modify metadata except for when > creating image, so it is safe to relax the permission. This makes > share-rw=on property work on virtual devices. > > Suggested-by: Daniel P. Berrangé <berrange> > Signed-off-by: Fam Zheng <famz> > Reviewed-by: Daniel P. Berrangé <berrange> > Signed-off-by: Kevin Wolf <kwolf> Pending backport. Fix included in qemu-kvm-rhev-2.12.0-22.el7 According to steps mentioned in Description, tested on qemu-kvm-rhev-2.12.0-22.el7, not hit this issue. So set status to VERIFIED. Versions: kernel-3.10.0-991.el7.x86_64 qemu-kvm-rhev-2.12.0-22.el7 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. https://access.redhat.com/errata/RHSA-2019:2553 |