Bug 1170771
| Summary: | virt-sparsify fails to sparsify CentOS 7 SWAP | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Yogesh Sharma <yogeshsharma> | ||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | mbooth, ptoscano, rbalakri | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2017-04-24 03:23:55 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: | |||||||
| Attachments: |
|
||||||
|
Description
Yogesh Sharma
2014-12-04 19:55:51 UTC
Created attachment 964804 [details]
verbose output
I meant to type "virt-sparsify --in-place /dev/ThinVol/C7Image" Thanks for filing the bug. Is there anything special about how the CentOS 7 guest was installed? I think you mentioned something about LVM thinp, which I've never used in CentOS (wouldn't even know how you'd get the installer to use it). The actual failure is interesting: guestfsd calls ioctl (BLKDISCARD) on the swap device, and we see: [ 3.253330] sd 2:0:0:0: [sda] [ 3.253936] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 3.254316] sd 2:0:0:0: [sda] [ 3.254316] Sense Key : Aborted Command [current] [ 3.254316] sd 2:0:0:0: [sda] [ 3.254316] Add. Sense: I/O process terminated [ 3.254316] sd 2:0:0:0: [sda] CDB: [ 3.254316] Write same(16): 93 08 00 00 00 00 00 0f a8 00 00 7c 80 00 00 00 [ 3.254316] end_request: I/O error, dev sda, sector 1026048 guestfsd: error: ioctl: /dev/sda2: BLKDISCARD: Input/output error There are several possible things that might be indicated by that: - actual disk corruption (unlikely, but something to check) - LVM thinp doesn't support/pass through the SCSI WRITESAME command properly - partition table mismatches or overlaps somehow - not all guest disks are being presented to libguestfs (is it a multi-disk guest?) This Debian bug is interesting: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757927 My setup Host Fedora 20 running on SSD + LVM Additional spinning disk with Thin LVM Volumes used mostly for KVM Disks For any KVM guest a LVM Thin Volume is created and used for Guest. CentOS 7 was installed using desk setting using DVD. Partition scheme was to use btrfs (/ ext3, / btrfs and swap). Disk was added to guest as Virtio-SCSI. Looking at fdisk -l at least not showing overlap. virt-sparsify only fails on swap cleaning. I get no error when I do it manually: kpartx -av <lvm thin vol> mount partitions with discard options and run fstrim. Looks like this issues was resolved, I am not getting this error with F25 + updates. |