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

Re: Using dd to copy a disk.



On Mon, Jul 28, 2003 at 11:14:32PM -0700, Bill Moseley wrote:
> > Note that I'm recommending you run lilo while you're concerned about
> > the MBR. It might work, but running LILO again gives you a bigger
> > chance to get it to work....
> 
> Yes, I would think I'd need to do that.  The RAID card is confusing to 
> me -- I assume the MBR says which drive and which sector (first sector, 
> I suppose) to load the OS.  So I'd think that would be different for the 
> new hardware.

Yes. However it should be telling:

	drive 0x80 sector 1234

where 1234 is the LBA of the sector to be requested, which will in 
fact not change. Also "drive 0x80" is "the first BIOS drive", which
should also work. So, as long as you've specified "LBA" as an option
in the lilo.conf, things might just work.....

> 
> > Oh, Note that you'd be copying a LIVE partition. A logging filesystem
> > like ext3 or XFS will take care in writing stuff to the drive in the
> > right order. You're screwing that up by just copying over the
> > raw drive.
> 
> So rsync would be a better way to go, then.  That would avoid that 
> problem.

Yes. In that case skipping the rerunning lilo step is no longer 
"dangerous" but "guaranteed not to work". 

> Otherwise, probably best to drop into single mode and then mount 
> everything read only, as you suggest, and then run the dd command.
> I assume rsync will handle the symlinks ok.  Plus I could re-partition 
> the drive (say into a single partition) and rsync wouldn't care.

Right. 

> I would have expected rsync to take longer, but I guess as was pointed 
> out dd will copy unused sectors.

Right.  In the case where I did it, it copied 70G of unused sectors, 
and finding out which 10G to copy took less time... 

		Roger. 

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* I didn't say it was your fault. I said I was going to blame it on you. *



Reply to: