[wplug] Backing up (cloning) to a smaller drive...

Jonathan Billings billings at negate.org
Mon Aug 13 16:01:25 EDT 2007


scoob8000 wrote:
> I'm trying to backup one hard drive to another.  Problem being is my new 
> drive is about several megs smaller than the old one.
> 
> The system is Fedora installed with the default ext3/LVM setup.
> 
> I figure I need to resize my ext3 partition a bit so everything will fit 
> on the new drive. 
> 
> I don't know much at all about LVM, and all of the partitioning tools 
> I'm familier with lists the partition type as UNKNOWN.
> 
> Can someone point me in the right direction here?  :)

Is there any reason why you have to have a clone of the filesystem? 
Resizing lvm volumes is possible, as well as resizing ext3 filesystems, 
but why go through the effort unnecessarily?

I assume that you aren't using the full capacity of the original drive, 
so you could always copy the data from one disk to the other, without 
needing to clone the filesystem.

One thing you could do is this:
I assume you have /dev/Old/Root as /, and /dev/New/Root as the new disk, 
at /mnt/newroot.  I'd then run:

cd /mnt/newroot;
/sbin/dump 0f - / | /sbin/restore rf -

That'll copy all the data from / to /mnt/newroot.  Since this is LVM, I 
suspect you'll also have to create and copy a /boot partition too, which 
isn't in LVM.

-- 
Jonathan Billings <billings at negate.org>


More information about the wplug mailing list