Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Stephane CHAZELAS <stephane_chazelas@yahoo.fr>
To: kvm@vger.kernel.org
Subject: Re: Convert one .img disk created with sparse=true to no sparse
Date: Fri, 21 Oct 2011 10:24:15 +0000 (UTC)	[thread overview]
Message-ID: <slrnja2i2f.5ku.stephane.chazelas@spam.is.invalid> (raw)
In-Reply-To: 20111021072826.Horde.qr6-I9JO7vlOoJJ63zcgY5A@mail.simonandkate.net

2011-10-21, 07:28(+10), Simon Wilson:
[...]
> If working with a NON-sparse VM img (i.e. originally created with  
> virt-install --nonsparse), does a cp without --sparse=never retain the  
> non-sparse nature of the file, or does it have to be specified?
[...]

See the man page for your "cp" command. The GNU implementation
of "cp" tries to replicate the sparseness of the files by
default, so if the source file wasn't sparse, the destination
shouldn't be either.

If in doubt, you can always use dd/cat/pv to avoid the extra
fancy hole punching that cp might or might not do.

-- 
Stephane


  reply	other threads:[~2011-10-21 10:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 11:21 Convert one .img disk created with sparse=true to no sparse Gonzalo Marcote Peña
2011-10-20 14:43 ` Stefan Hajnoczi
2011-10-20 21:28   ` Simon Wilson
2011-10-21 10:24     ` Stephane CHAZELAS [this message]
2011-10-21 11:20     ` Gonzalo Marcote Peña
2011-10-20 14:56 ` Stephane CHAZELAS
2011-10-20 15:57   ` Stephane CHAZELAS

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrnja2i2f.5ku.stephane.chazelas@spam.is.invalid \
    --to=stephane_chazelas@yahoo.fr \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox