[Gllug] migrating install to larger hd

Ian Northeast ian at house-from-hell.demon.co.uk
Wed Jun 2 19:40:06 UTC 2004


Ben Fitzgerald wrote:
> Hi,
> 
> I've got a hd that's filling up.
> 
> I have a larger disk I'd like to move my install to.
> 
> What's the quickest way to get it across and working?
> 
> Here are my initial thoughts:
> 
> A basic dd is out due to the disks being diferrent.
> 
> I'd like to get lvm going on the target so I can resize
> partitions more easily in the future to make the most of
> the disk space. I assume I'll need initrd with lvm modules.

Moving the system from one disk to another is probably the easiest way 
to "LVM" a system which is currently in partitions.

You don't need an initrd as long as you leave root in a partition. I 
don't see much advantage to having root in an LV so this is what I do. 
This is only really practical as long as you have all the normal 
filesystems mounted - /usr, /var, /opt and /home, /tmp if you have one 
plus any other data partitions.

Install the LVM software if it isn't already, partition the new disk 
into two - one generously sized one (250MB should be ample) for root to 
ensure that it can't fill, and one for a PV. Create the VG and LVs for 
the other partitions - you can be conservative here as long as you're 
using a resizable filesystem type. Copy the contents over, preferably 
with tar as others have suggested. This is best done in single user 
mode. Amend /etc/fstab on the new root partition. Write a boot loader 
onto the new disk (this may require a bit of fiddling especially with 
LILO. Having a bootable rescue disk is essential at this point).

That should more or less do it.

Regards, Ian

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list