Bug 1185561
| Summary: | virt-sparsify should ignore read-only LVs | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Fabian Deutsch <fdeutsch> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 21 | CC: | mbooth, ptoscano, rjones, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-02-02 13:42:32 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: | |||
|
Description
Fabian Deutsch
2015-01-24 18:21:39 UTC
I think you mean "lvchange", not "vgchange" :-) That had me confused for a while ... Simple reproducer: $ guestfish -N bootrootlv debug sh "lgchange --permission r VG/LV" $ rm -f test2.img $ truncate -s 200M test2.img $ virt-sparsify test1.img test2.img Input disk virtual size = 104857600 bytes (100.0M) Create overlay file in /tmp to protect source disk ... Examine source disk ... Fill free space in /dev/VG/LV with zero ... virt-sparsify: error: libguestfs error: zero_free_space: open: /sysroot//xmjgtnhn.qve: Read-only file system In order to get the read-only status of an LV, we must use guestfs_lvs_full and look for the 'r' flag in the lv_attr field. (In reply to Richard W.M. Jones from comment #1) > I think you mean "lvchange", not "vgchange" :-) That had me confused > for a while ... Argh. Yes, sorry for that typo. (In reply to Richard W.M. Jones from comment #1) … > Simple reproducer: > > $ guestfish -N bootrootlv debug sh "lgchange --permission r VG/LV" It should actually be lvchange, instead of lgchange. |