[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Failing system drive: mirror or clone to new drive via cp and rsync and grub configuration



On Sun, Mar 27, 2005 at 02:57:44AM -0500, Darryl Clarke wrote:
> On Sun, 27 Mar 2005 02:07:00 -0500, Mitchell Laks <mlaks@verizon.net> wrote:
> > Hi,
> > 
> > i am running Debian Sarge on a server.
> > 
> > I just had a server with a failing system drive /dev/hda. In particular errors
> > write errors from the /var partiton = /dev/hda7.
> > 
> > I decided to clone the system drive to /dev/hdb and I wanted to document, for
> > others benefit, what I did.
> 
> Awesome, much thanks as this is something I need to do. I've been
> researching a bit, but since it's not critical I've taken my time. 
> One note though, regarding rsync (and I for one would rather use it
> entirely and avoid cp, just because rsync is a bit "smarter")

Found this somewhere:

   Hook up your soon-to-be-cloned hard disk to your system (power off
   during this operation). Boot your box. As root, cd to / mount the 
   new hard drive on /mnt. Then run the following command:

   # tar clf- . | (umask 0; cd /mnt; tar xvf-)

   c create
   l stay on local filesystem (don't cross filesystem boundaries)
   f file (the next argument is the name of the tarfile or "-")
   - write to stdout or read from stdin
   x extract
   v verbose
   "umask 0" ensures that the new files have the same permissions as
             the old ones.

I think it was a tip in the Linux Journal. 

-- 
cheers
Chris.
======



Reply to: