Need to Clone a hard disk - Redhat

This is a discussion on Need to Clone a hard disk - Redhat ; Hi, Using Redhat 7.3 I need to clone a hard disk (data and boot sector); can I use the dd command to do this? What would be the command syntax please? WOuld it work over a TCP/IP network or do ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Need to Clone a hard disk

  1. Need to Clone a hard disk

    Hi,

    Using Redhat 7.3

    I need to clone a hard disk (data and boot sector); can I use the dd
    command to do this? What would be the command syntax please? WOuld
    it work over a TCP/IP network or do I need to place both disks in the
    same PC?

    Thanks,
    Don

  2. Re: Need to Clone a hard disk

    Don wrote:
    > I need to clone a hard disk (data and boot sector); can I use the dd
    > command to do this? What would be the command syntax please? WOuld
    > it work over a TCP/IP network or do I need to place both disks in the
    > same PC?


    Yes.

    # umount /dev/hdc
    # umount /dev/hdd
    #
    # dd if=/dev/hdc of=/dev/hdd

    Easiest way is to have both drives in the same machine, as
    you can see from the 3 commands above. To do this over
    TCP/IP you can make a file using the dd command, ftp (or
    your favorite file transfer utility) the file, and then use
    the dd command to write the file to the physical device. I
    like to compress these images, so they take up less space.
    Looks something like this:

    # umount /dev/hdc
    #
    # dd if=/dev/hdc |gzip -9 >hdc.gz

    Transfer the file, then do this:

    # umount /dev/hdc
    #
    # zcat hdc.gz|dd of=/dev/hdc


    It's probably a good idea to only do this when all
    partitions are unmounted, especially if you are using a
    journaled filesystem. The duplicate hard drive needs to be
    pretty much identical to the original. Things might work OK
    if the duplicate is larger, but problems will almost
    certainly show up if the dup drive is smaller...


  3. Re: Need to Clone a hard disk

    Check out partimage and systemimager.

    http://partimage.org
    http://systemimager.org

    Partimage is much like a symantec ghost deal, taking an image and
    sending it locally or across the network.
    Systemimager is quite a bit different, but really cool for complete
    local backups, and it uses rsync, which makes updates to the client or
    server so much faster.

    I personally use and prefer systemimager for creating cloned machines
    in my cluster environments, but partimage certainly has its place.

    "Kevin D. Snodgrass" wrote in message news:<408E9464.8050803@spamcop.net>...
    > Don wrote:
    > > I need to clone a hard disk (data and boot sector); can I use the dd
    > > command to do this? What would be the command syntax please? WOuld
    > > it work over a TCP/IP network or do I need to place both disks in the
    > > same PC?

    >
    > Yes.
    >
    > # umount /dev/hdc
    > # umount /dev/hdd
    > #
    > # dd if=/dev/hdc of=/dev/hdd
    >
    > Easiest way is to have both drives in the same machine, as
    > you can see from the 3 commands above. To do this over
    > TCP/IP you can make a file using the dd command, ftp (or
    > your favorite file transfer utility) the file, and then use
    > the dd command to write the file to the physical device. I
    > like to compress these images, so they take up less space.
    > Looks something like this:
    >
    > # umount /dev/hdc
    > #
    > # dd if=/dev/hdc |gzip -9 >hdc.gz
    >
    > Transfer the file, then do this:
    >
    > # umount /dev/hdc
    > #
    > # zcat hdc.gz|dd of=/dev/hdc
    >
    >
    > It's probably a good idea to only do this when all
    > partitions are unmounted, especially if you are using a
    > journaled filesystem. The duplicate hard drive needs to be
    > pretty much identical to the original. Things might work OK
    > if the duplicate is larger, but problems will almost
    > certainly show up if the dup drive is smaller...


+ Reply to Thread