Re: Using dd to copy a disk.

From: Bill Moseley (moseley_at_hank.org)
Date: 07/29/03

  • Next message: Ron Johnson: "Re: Can't Keep Kernel Log Messages From Console"
    Date: Mon, 28 Jul 2003 23:14:32 -0700
    To: Rogier Wolff <R.E.Wolff@BitWizard.nl>
    
    

    On Tue, Jul 29, 2003 at 07:55:24AM +0200, Rogier Wolff wrote:

    > > Can I build a new bare metal drive on /dev/hda using dd
    > >
    > > dd if=/dev/sda of=/dev/hda
    > >
    > > Will that work with the hardware RAID array? If so will it also copy
    > > the MBR?
    >
    > Yep. Yep.
    >
    > > The destination drive will NOT be used in a RAID array. Also, the
    > > drives in the RAID array cannot be used outside of the array due to the
    > > meta data written by 3ware card.
    >
    > I take objection to the term "cannot be used":
    > As "harddisk-recovery.com" we'll make them work if neccesary, but
    > that's not really relevant now.

    Well, I meant I couldn't pull a drive out of the RAID array and use it
    as a stand-alone IDE drive as it.

    > - Modify the /etc/fstab and /etc/lilo.conf files before rebooting.
    > - Add

    Yes, my fstab points to /dev/sda* and the new drive will be at /dev/hda*

    > to Lilo.conf, mount the hda disk on /mnt and then run
    > lilo -r /mnt
    >
    > (Mount at least the / and /boot partitions! Hmm. you don't have /boot,
    > so "/" would have to do.... )
    >
    > 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.

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

    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.

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

    Thanks much for all the tips.

    -- 
    Bill Moseley
    moseley@hank.org
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Ron Johnson: "Re: Can't Keep Kernel Log Messages From Console"

    Relevant Pages

    • Re: Help please: nightmare RAID issues (I think)
      ... I ahve pretty much accep[ted the MBR is wiped but data is OK ... it enables me to boot to my RAID array ... of the drives to another PC as a second drive in IDE mode and see what ...
      (uk.comp.homebuilt)
    • Re: Boot Manager
      ... No boot manager that usurps the MBR bootstrap area will cooperate with a drive overlay manager which also usurps the MBR bootstrap area. ... If you actually need to use the drive overlay manager, you'll need to find a boot manager that does NOT use the MBR bootstrap area (which means it might requires its own partition or share one). ... You might need to consider getting a new motherboard with a newer BIOS that can actually support the large drives that you want to use, or use an IDE controller card that has newer BIOS to support the larger drives. ...
      (microsoft.public.windowsxp.general)
    • Re: dual booting XP and Linux
      ... /dev/hda - MBR ... I don't worry too much now, since I'm booting fine into GRUB and from there ... > Millions of people are using to grub to boot Linux and/or Windows.. ... I like the idea of removing the hard drives because it is safe. ...
      (Fedora)
    • Re: FreeBSD MBRs
      ... I've a machine with 3 SATA drives. ... FreeBSD install in a single slice with /boot/boot0 MBR. ... the boot order of the disks set in the BIOS. ... You only need an MBR on disks that will be booted. ...
      (freebsd-questions)
    • Re: FreeBSD MBRs
      ... FreeBSD install in a single slice with /boot/boot0 MBR. ... the boot order of the disks set in the BIOS. ... Flashing the BIOS often resets all settings, ... Is putting boot0 on all three drives a good idea perhaps? ...
      (freebsd-questions)