[plug] dd speed estimates and /dev/hdx grepping

Craig Ringer craig at postnewspapers.com.au
Thu Oct 23 11:20:44 WST 2003


> I also forgot to ask, do the drives have to be the same size? or can the
> destination drive be larger?
> 
> I have an 8GB src drive and 40GB dest drive..

Well, the destination must be larger than the source for a direct 
disk-to-disk copy. Additionally, even in that case you may have problems 
with the partition table etc if the disks are not identical.

Your best bet is usually to shrink all the filesystems on on the source 
disk using something like resize2fs or resierfs_resize (if the source FS 
is bigger than the destination partition), then dd over the compacted 
filesystem to a partition on the new disk. You can then expand the 
filesystem to fill the partition it's now on. While you can shrink the 
partition on the source disk to fit the shrunk filesystem, I generally 
don't bother - I just use `dd ... count=` to copy only the used part of 
the partition to the target file or partition.

If your target partition is larger than your source partition, you can 
just dd over the partition and then expand the filesystem - no fuss.

Craig Ringer


_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list