[svlug] ext3 and dd disk cloning

Marc MERLIN marc_news at vasoftware.com
Fri Jan 25 09:08:02 PST 2002


On Fri, Jan 25, 2002 at 11:57:49AM -0500, Justin F. Knotzke wrote:
> On Fri, Jan 25, 2002 at 08:50:28AM -0800, Marc MERLIN wrote:
> 
> > Mmmh, I'm not convinced.
> > I don't  think the kernel  knows that you have  duplicated the disk  and are
> > trying to mount it on another machine.
> > (it'd have to create a hash per machine, just like XP)
> 
> 	http://linux.lexilog.org.uk/fs.html
 
It says that if you clone the  disk, you should expect problems if you mount
both disks on the same machine. I can believe that.
 
> 	Not sure if that's the case but I do know that when I do clone a
> drive using dd and I put the cloned drive into another machine the
> kernel boots and just as it attempts to mount the drive, I get a login
> prompt and it will not allow me to login. There are no errors. This has

Ok, so this confirms that it's very unlikely that ext3 is ihvolved, from
what you say, everything mounts fine.
Try to boot with
init single
or
init=/bin/bash ( + "mount -wno remount /; mount -a" when you get a prompt)

and work from there, and look at your logs to see if they say why you
couldn't log in.

> happened twice. I can boot the machine using the original drive and
> mount the cloned drive and all the data appears to be there but I cannot
> boot with that cloned drive.

Not to be picky, but it does "boot". You are just having some problem that
prevents you from login in.
Make sure that when you do 
dd if=/dev/sda of=/dev/sdb bs=1M
both /dev/sda and /dev/sdb are fully unmounted (use a boot CD or floppy)

> > If this were really the case however, you could remove the journal with:
> > tune2fs -O ^has_journal /dev/part
> > which effectively turns your ext3 partition into an ext2 one.
> 
> 	Ok, I will try that after the clone.

Note that I very much doubt it will make a difference, but you're welcome to
try.

-- 
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
  
Home page: http://marc.merlins.org/   |   Finger marc_f at merlins.org for PGP key




More information about the svlug mailing list