[CentOS] Transferring system to new drive

Tue Sep 14 13:10:48 UTC 2010
Robert Heller <heller at deepsoft.com>

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

> 
> John R Pierce 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 generally use dump ... | restore ...     to clone a complete e2fs/e3fs
> > volume.  it copies everything exactly on an inode by inode basis.
> 
> Thanks for the suggestion.
> Could you give a concrete command for copying /
> to say a new filesystem on /mnt/hd ?
> 
> (I'm wondering how this approach deals with symbolic links, 
> /dev , /proc , etc

You *don't* copy /dev, /proc, or /sys!  These are run-time generated
file systems.  /dev is a ramdisk, populated by udevd, /proc and /sys
are file system mappings of kernel data structures.  All three will
appear and be 'populated' during the boot process. dump 'does the right
thing' WRT links (both hard and symbolic), does the right thing for
sockets and named pipes.  Does things by physical file system -- does
exactly one, skipping other mounted file systems encountered along the
way). You do need to dump ... | restore ... *each* disk file system (/,
/boot, etc.).


-- 
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/