linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] LVM snapshot - "dd" file size
@ 2008-04-16 14:59 Thomas Bellembois
  2008-04-16 21:04 ` dave
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Bellembois @ 2008-04-16 14:59 UTC (permalink / raw)
  To: linux-lvm

Hi!

I am using LVM partitions on a Debian Xen system.
I use LVM snapshots to clone and backup my virtual machines.

I have noticed that the ISO file created with the "dd" command it much
bigger that the partition used space (actually 4.7GB for the ISO - 500MB
used space). No problem if I mount the LVM snapshot and "tar" all of the
data.

I have googled the question and read that "dd" also copy "not used space".
Why is the ISO file so big ? Is the "tar" method less safe ?
Is there a better solution ?

Thanks for your answers.

Regards,

Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] LVM snapshot - "dd" file size
  2008-04-16 14:59 [linux-lvm] LVM snapshot - "dd" file size Thomas Bellembois
@ 2008-04-16 21:04 ` dave
  2008-04-16 21:36   ` Denie Andriessen
  0 siblings, 1 reply; 4+ messages in thread
From: dave @ 2008-04-16 21:04 UTC (permalink / raw)
  To: LVM general discussion and development

this has nothing to do with LVM.  

dd knows nothing about files, it just copies the entire device (or file or whatever). 

tar will work, if you use the right command line switches. Search around on the web for pointers on how to use it.

Another intermediate way would be to compress the image you get with dd.

On Wed, Apr 16, 2008 at 04:59:05PM +0200, Thomas Bellembois wrote:
> Hi!
> 
> I am using LVM partitions on a Debian Xen system.
> I use LVM snapshots to clone and backup my virtual machines.
> 
> I have noticed that the ISO file created with the "dd" command it much
> bigger that the partition used space (actually 4.7GB for the ISO - 500MB
> used space). No problem if I mount the LVM snapshot and "tar" all of the
> data.
> 
> I have googled the question and read that "dd" also copy "not used space".
> Why is the ISO file so big ? Is the "tar" method less safe ?
> Is there a better solution ?
> 
> Thanks for your answers.
> 
> Regards,
> 
> Thomas
> 
> 
> 
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] LVM snapshot - "dd" file size
  2008-04-16 21:04 ` dave
@ 2008-04-16 21:36   ` Denie Andriessen
  2008-04-17 12:44     ` Thomas Bellembois
  0 siblings, 1 reply; 4+ messages in thread
From: Denie Andriessen @ 2008-04-16 21:36 UTC (permalink / raw)
  To: LVM general discussion and development

A compressed dd can still be quite large, as there still might contain non 
zero values..

if you compress the image, a possible way to make the resulting files 
smaller is to:

- do a: 'dd if=/dev/zero of=/dummyfile' on the filesystem first (you might 
want to use 'bs' and 'count' parameters)
- if you topped off the disk, delete the all zero dummyfile.

The zipped result might be smaller. (both with dd and with tar..)

Regards,
Denie

----- Original Message ----- 
From: <dave@frop.net>
To: "LVM general discussion and development" <linux-lvm@redhat.com>
Sent: Wednesday, April 16, 2008 11:04 PM
Subject: Re: [linux-lvm] LVM snapshot - "dd" file size


> this has nothing to do with LVM.
>
> dd knows nothing about files, it just copies the entire device (or file or 
> whatever).
>
> tar will work, if you use the right command line switches. Search around 
> on the web for pointers on how to use it.
>
> Another intermediate way would be to compress the image you get with dd.
>
> On Wed, Apr 16, 2008 at 04:59:05PM +0200, Thomas Bellembois wrote:
>> Hi!
>>
>> I am using LVM partitions on a Debian Xen system.
>> I use LVM snapshots to clone and backup my virtual machines.
>>
>> I have noticed that the ISO file created with the "dd" command it much
>> bigger that the partition used space (actually 4.7GB for the ISO - 500MB
>> used space). No problem if I mount the LVM snapshot and "tar" all of the
>> data.
>>
>> I have googled the question and read that "dd" also copy "not used 
>> space".
>> Why is the ISO file so big ? Is the "tar" method less safe ?
>> Is there a better solution ?
>>
>> Thanks for your answers.
>>
>> Regards,
>>
>> Thomas
>>
>>
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] LVM snapshot - "dd" file size
  2008-04-16 21:36   ` Denie Andriessen
@ 2008-04-17 12:44     ` Thomas Bellembois
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bellembois @ 2008-04-17 12:44 UTC (permalink / raw)
  To: LVM general discussion and development

Nice tip ! It works fine !
Thanks a lot.

Ragards,

Thomas

Denie Andriessen wrote:
> A compressed dd can still be quite large, as there still might contain
> non zero values..
>
> if you compress the image, a possible way to make the resulting files
> smaller is to:
>
> - do a: 'dd if=/dev/zero of=/dummyfile' on the filesystem first (you
> might want to use 'bs' and 'count' parameters)
> - if you topped off the disk, delete the all zero dummyfile.
>
> The zipped result might be smaller. (both with dd and with tar..)
>
> Regards,
> Denie
>
> ----- Original Message ----- From: <dave@frop.net>
> To: "LVM general discussion and development" <linux-lvm@redhat.com>
> Sent: Wednesday, April 16, 2008 11:04 PM
> Subject: Re: [linux-lvm] LVM snapshot - "dd" file size
>
>
>> this has nothing to do with LVM.
>>
>> dd knows nothing about files, it just copies the entire device (or
>> file or whatever).
>>
>> tar will work, if you use the right command line switches. Search
>> around on the web for pointers on how to use it.
>>
>> Another intermediate way would be to compress the image you get with dd.
>>
>> On Wed, Apr 16, 2008 at 04:59:05PM +0200, Thomas Bellembois wrote:
>>> Hi!
>>>
>>> I am using LVM partitions on a Debian Xen system.
>>> I use LVM snapshots to clone and backup my virtual machines.
>>>
>>> I have noticed that the ISO file created with the "dd" command it much
>>> bigger that the partition used space (actually 4.7GB for the ISO -
>>> 500MB
>>> used space). No problem if I mount the LVM snapshot and "tar" all of
>>> the
>>> data.
>>>
>>> I have googled the question and read that "dd" also copy "not used
>>> space".
>>> Why is the ISO file so big ? Is the "tar" method less safe ?
>>> Is there a better solution ?
>>>
>>> Thanks for your answers.
>>>
>>> Regards,
>>>
>>> Thomas
>>>
>>>
>>>
>>> _______________________________________________
>>> linux-lvm mailing list
>>> linux-lvm@redhat.com
>>> https://www.redhat.com/mailman/listinfo/linux-lvm
>>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>> _______________________________________________
>> linux-lvm mailing list
>> linux-lvm@redhat.com
>> https://www.redhat.com/mailman/listinfo/linux-lvm
>> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-17 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-16 14:59 [linux-lvm] LVM snapshot - "dd" file size Thomas Bellembois
2008-04-16 21:04 ` dave
2008-04-16 21:36   ` Denie Andriessen
2008-04-17 12:44     ` Thomas Bellembois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).