Re: Disk cloning script...

From: DoN. Nichols (dnichols_at_d-and-d.com)
Date: 04/10/05

  • Next message: Bev A. Kupf: "Re: Disk cloning script..."
    Date: 10 Apr 2005 00:06:12 -0400
    
    

    In article <slrnd5gp2l.17a.bevakupf@myhome.net>,
    Bev A. Kupf <orinxhcs@foptybony.arg> wrote:
    >On Sat, 09 Apr 2005 15:51:45 -0700,
    > Michael Pelletier (mjpelletier@mjpelletier.com) wrote:
    >>> Hmm... `dd if=/dev/hda of=hda.dump' isn't sufficient?
    >>>
    >>
    >> Here is the situation. I have two disks let's say ad0 and ad1. How could I
    >> use the dd command to mirror disk ad0 to disk ad1? I have a disk that I
    >> think will go bad (acd0) and need to mirror it to a new disk (acd1) before
    >> it dies...
    >
    >You would use something like: `dd if=/dev/acd0 of=/dev/acd1 bs=512`

            This works quite well on a fairly static system, and I've used
    it to make a spare bootable disk to move an OS to new hardware.
    However:

    1) The disk sizes should be identical.

    2) It goes a *lot* faster if you make that command:

                    dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c1t0d0s2 bs=51200

            instead. (Sun Solaris syntax, using the names for the entire
            disk, rather than only one partition.) "dd" is smart enough to
            deal with the partial block likely at the end.

            But I would strongly advise running fsck on each partition after
    you are done, just in case something changed while you were duplicating.
    If *all* the fscks fail, retry it with "bs=5120" instead, as you may be
    overshooting the DMA block size.

            And if possible, take the system down to single-user mode first,
    so there are fewer things *likely* to change as you are duplicating.

    >However, if you think that acd0 is failing, you should really take
    >a look at dd_rescue <http://www.garloff.de/kurt/linux/ddrescue/>

            Hmm ... he didn't say what OS -- though we can assume some kind
    of unix, based on the newsgroup name. Does this compile and work on
    other unix variants?

            Good Luck,
                    DoN.

    -- 
     Email:   <dnichols@d-and-d.com>   | Voice (all times): (703) 938-4564
    	(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
               --- Black Holes are where God is dividing by zero ---
    

  • Next message: Bev A. Kupf: "Re: Disk cloning script..."