Bug 1056290 - virt-sparsify overwrites block devices if used as output files
Summary: virt-sparsify overwrites block devices if used as output files
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1056556 1056558 1122557
TreeView+ depends on / blocked
 
Reported: 2014-01-21 21:58 UTC by Richard W.M. Jones
Modified: 2015-06-10 13:46 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
: 1056556 1056558 1122557 (view as bug list)
Environment:
Last Closed: 2014-01-22 13:13:08 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-01-21 21:58:58 UTC
Description of problem:

(Reported by shawnjgoff on IRC)

If you do something like:

  virt-sparsify infile /dev/vg/lv

then virt-sparsify will overwrite /dev/vg/lv with a file, which
is not exactly as intended.

It should detect if the output is a block device and (probably)
reject the attempt, although there is a possible use case which
is writing a qcow2 file into an LV (as used by oVirt).

Version-Release number of selected component (if applicable):

virt-sparsify 1.20.11rhel=6,release=2.el6

Comment 1 Richard W.M. Jones 2014-01-22 13:12:47 UTC
Upstream fix is: 13bca32e4ec9213e69ea55e837dea846719fb67e
available in libguestfs >= 1.25.26 and >= 1.24.6.


Note You need to log in before you can comment on or make changes to this bug.