[CentOS] Transferring system to new drive

Robert Heller heller at deepsoft.com
Tue Sep 14 13:03:13 UTC 2010


At Tue, 14 Sep 2010 13:12:46 +0100 CentOS mailing list <centos at centos.org> wrote:

> 
> 
> Is there a document with instructions for this?
> I've had smartd warnings that a hard disk in my server is sick,
> so I am installing a new drive (in addition to the old).
> 
> I was thinking of copying the old root partition with
> 	sudo cp -a -P /* /mnt/hd
> (after mounting the prospective new root partition).
> Then I'd have to modify the new /etc/fstab .
> 
> Is that a sensible approach?

Probably not.  Do you have a separate /boot file system? The default
CentOS installer generally creates a separate /boot file system and puts
everything else on a LVM volume group (and carves two logical volumes
from that: one for swap and one for /).

Here is an article I wrote about doing this:

http://www.deepsoft.com/2009/01/how-to-transfer-a-linux-system-from-one-disk-to-another/



-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller at deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                                 



More information about the CentOS mailing list