From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephane CHAZELAS Subject: Re: Convert one .img disk created with sparse=true to no sparse Date: Fri, 21 Oct 2011 10:24:15 +0000 (UTC) Message-ID: References: <20111021072826.Horde.qr6-I9JO7vlOoJJ63zcgY5A@mail.simonandkate.net> To: kvm@vger.kernel.org Return-path: Received: from lo.gmane.org ([80.91.229.12]:55504 "EHLO lo.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753788Ab1JUKYa (ORCPT ); Fri, 21 Oct 2011 06:24:30 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RHCH6-0001QI-Qm for kvm@vger.kernel.org; Fri, 21 Oct 2011 12:24:28 +0200 Received: from 188-223-3-27.zone14.bethere.co.uk ([188.223.3.27]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Oct 2011 12:24:28 +0200 Received: from stephane_chazelas by 188-223-3-27.zone14.bethere.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Oct 2011 12:24:28 +0200 Sender: kvm-owner@vger.kernel.org List-ID: 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