How to optimize the cloning of a disk with a big empty ext3 partition?

Gregoire Gentil gregoire at gentil.com
Sun Jun 21 00:42:09 UTC 2009


Thanks for the suggestion,

Grégoire

On Fri, 2009-06-19 at 21:39 -0700, Stephen Samuel (gmail) wrote:
> A program like partimage will copy only the sectors that are already
> in use, but it 
> requires that the destination partition be at least as big as the
> original (otherwise
> it would be required to relocate used sectors that are near the end of
> the parttition).
> 
> The only real way around your problem would be to resize2fs to resize
> the filesystem
> (not the partition) to  a bit over 1GB At that point you could safely
> copy only the first
> Gig of the partition (whatever size you changed the filesystem to).
> You could then 
> (if you wanted to) resize the filesystem back to fill the partition. 
> 
> If you just need the data from the partition archived, and don't need
> it to be live, 
> then you can just use partimage to dump the used sectors, into a
> file... When you 
> need to reconstitute the filesystem, however, partimage will want to
> create a filesystem
> the same size as the original. 
> 
> On Fri, Jun 19, 2009 at 4:42 PM, Gregoire Gentil <gregoire at gentil.com>
> wrote:
>         Hello,
>         
>         I need to duplicate a huge number of identical 8GB SD cards on
>         which I
>         have 1GB of data at the beginning of the disk on various
>         partitions and
>         then a 7GB ext3 partition which is rather empty (just a few MB
>         of data).
>         
>         The duplicator device enables me to select which sectors I can
>         binary-duplicate. I would love to divide by 8 my duplication
>         time, by
>         duplicating only the first GB and then the beginning of the
>         7GB ext3
>         partition.
>         
>         When I do a mkfs.ext3, I see that the super-block is written
>         to various
>         locations of the partition which is not good for the
>         optimization I
>         would like to do.
>         
>         Anyone can advise how I could optimize my duplication? What
>         are my
>         options? Would it be the same situation for ext2? Meaning
>         where is the
>         journal written on the ext3 partition? Is there a single
>         version or
>         multiple versions?
>         
>         Thanks in advance for any answer or pointer,
> 
> -- 
> Stephen Samuel http://www.bcgreen.com  Software, like love, 
> 778-861-7641                              grows when you give it away




More information about the Ext3-users mailing list