[clug] Moving the contents of / to a new filesystem on Ubuntu?

Ben Coughlan ben.coughlan at gmail.com
Mon Jul 26 08:31:59 MDT 2010


Is the root partition on LVM as well?  If so, then you can migrate all data from that disk with

# pvmove /dev/sda

Where /dev/sda is the physical volume (PV) that is failing.

Then disable any new data from being allocated to it with (I think):

# pvchange -x n /dev/sda

Of course this process won't move your boot partition, as you can't exactly boot from LVM.  So this will still need some DDing.

Failing all that, my next suggestion would be to boot from a rescue disk so you can dd everything to where you want it.

Ben Coughlan

On 27/07/2010, at 12:10 AM, Michael Still wrote:

> Hi.
> 
> I don't spend a lot of time doing really low level disk admin these days, so I apologize for the noob question.
> 
> I have a root file system at home on a disk which is failing. I also have a RAID file system on this machine on disks which aren't failing [1].
> 
> Is there a nice tool in Ubuntu which will support moving the contents of / to this file system without a reinstall? I could do it manually, but its fiddly to do while remote from the machine, which I will be for the next 10 days.
> 
> Thanks,
> Mikal
> 
> 1: Pairs of software RAID mirrored disks, concatenated with LVM if that matters.
> -- 
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux



More information about the linux mailing list