HD clone


Advanced search

Message boards : Unix/Linux : HD clone

Sort
Author Message
j2satx
Volunteer tester

Joined: Dec 22 06
Posts: 183
ID: 339
Credit: 16,191,581
RAC: 0
Message 2588 - Posted 26 Feb 2007 23:30:46 UTC


What do you experts use to clone one HD to another?

I've always used Ghost for my Windows HDs, but it doesn't seem to work with Linux.

I've looked at G4U and G4L on SourceForge, but they seem to need a "server".

I just want a straight forward (if there is such a thing) way to clone one Linux HD to another.

I hate loading the same SW on identical systems.

Thanks.

Profile Andre Kerstens
Forum moderator
Project tester
Volunteer tester
Avatar

Joined: Sep 11 06
Posts: 749
ID: 1
Credit: 15,199
RAC: 0
Message 2591 - Posted 26 Feb 2007 23:46:45 UTC - in response to Message ID 2588 .
Last modified: 26 Feb 2007 23:54:35 UTC

dd if=/dev/hda of=/dev/hdb bs=4096

where 'if' is your source harddisk and 'of' is your new harddisk that will get the copy (the clone). 'bs' stands for blocksize and should be as large as possible to make the copying faster. 4096 (4k) is the default blocksize that most file systems use on their disks.

Dolly is a tool that clones disks that makes use of dd (made by a friend of mine when he studied at ETHZ):
http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly.html

Andre

PS1 Your new disk should be the same size or larger as the disk you want to clone else this process won't work.
PS2 This is also implies your PC's are more or less composed of the same hardware, so that the kernel of one can also start on the clone.
PS3 Why buying expensive programs if Linux has all you need build in the box :-)


What do you experts use to clone one HD to another?

I've always used Ghost for my Windows HDs, but it doesn't seem to work with Linux.

I've looked at G4U and G4L on SourceForge, but they seem to need a "server".

I just want a straight forward (if there is such a thing) way to clone one Linux HD to another.

I hate loading the same SW on identical systems.

Thanks.


____________
D@H the greatest project in the world... a while from now!
j2satx
Volunteer tester

Joined: Dec 22 06
Posts: 183
ID: 339
Credit: 16,191,581
RAC: 0
Message 2592 - Posted 27 Feb 2007 0:01:36 UTC - in response to Message ID 2591 .

dd if=/dev/hda of=/dev/hdb bs=4096

where 'if' is your source harddisk and 'of' is your new harddisk that will get the copy (the clone). 'bs' stands for blocksize and should be as large as possible to make the copying faster. 4096 (4k) is the default blocksize that most file systems use on their disks.

Dolly is a tool that clones disks that makes use of dd (made by a friend of mine when he studied at ETHZ):
http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly.html

Andre

PS1 Your new disk should be the same size or larger as the disk you want to clone else this process won't work.
PS2 This is also implies your PC's are more or less composed of the same hardware, so that the kernel of one can also start on the clone.
PS3 Why buying expensive programs if Linux has all you need build in the box :-)


What do you experts use to clone one HD to another?

I've always used Ghost for my Windows HDs, but it doesn't seem to work with Linux.

I've looked at G4U and G4L on SourceForge, but they seem to need a "server".

I just want a straight forward (if there is such a thing) way to clone one Linux HD to another.

I hate loading the same SW on identical systems.

Thanks.



Thanks...I'll give that a whirl.

What "Linux Idiot" book do you recommend?
j2satx
Volunteer tester

Joined: Dec 22 06
Posts: 183
ID: 339
Credit: 16,191,581
RAC: 0
Message 2593 - Posted 27 Feb 2007 0:49:24 UTC - in response to Message ID 2591 .

dd if=/dev/hda of=/dev/hdb bs=4096

where 'if' is your source harddisk and 'of' is your new harddisk that will get the copy (the clone). 'bs' stands for blocksize and should be as large as possible to make the copying faster. 4096 (4k) is the default blocksize that most file systems use on their disks.

Dolly is a tool that clones disks that makes use of dd (made by a friend of mine when he studied at ETHZ):
http://www.cs.inf.ethz.ch/CoPs/patagonia/dolly.html

Andre

PS1 Your new disk should be the same size or larger as the disk you want to clone else this process won't work.
PS2 This is also implies your PC's are more or less composed of the same hardware, so that the kernel of one can also start on the clone.
PS3 Why buying expensive programs if Linux has all you need build in the box :-)




Most of the cruncher drives I'm using are 8.4Gb. Should I partition to just 8Gb and leave an unformatted piece at the end to ensure the drive I'm cloning to will always be larger, even though just a few hundred Mb.
Profile Andre Kerstens
Forum moderator
Project tester
Volunteer tester
Avatar

Joined: Sep 11 06
Posts: 749
ID: 1
Credit: 15,199
RAC: 0
Message 2594 - Posted 27 Feb 2007 2:17:41 UTC - in response to Message ID 2593 .


Most of the cruncher drives I'm using are 8.4Gb. Should I partition to just 8Gb and leave an unformatted piece at the end to ensure the drive I'm cloning to will always be larger, even though just a few hundred Mb.


Formatting before a dd is not needed. dd does an exact byte for byte raw copy of one disk to another. After the cloning, you can grow one of your existing file systems or make a new one in the extra space in case your clone disk is larger than the source disk.

Cheers
Andre

PS This is very useful as a rescue method as well since you can always play back the image you made of your disk. If you compress your image using gzip or bzip2 you can easily store it somewhere (other disk, cd, dvd, etc)
____________
D@H the greatest project in the world... a while from now!
j2satx
Volunteer tester

Joined: Dec 22 06
Posts: 183
ID: 339
Credit: 16,191,581
RAC: 0
Message 2595 - Posted 27 Feb 2007 2:39:16 UTC - in response to Message ID 2594 .


Most of the cruncher drives I'm using are 8.4Gb. Should I partition to just 8Gb and leave an unformatted piece at the end to ensure the drive I'm cloning to will always be larger, even though just a few hundred Mb.


Formatting before a dd is not needed. dd does an exact byte for byte raw copy of one disk to another. After the cloning, you can grow one of your existing file systems or make a new one in the extra space in case your clone disk is larger than the source disk.

Cheers
Andre

PS This is very useful as a rescue method as well since you can always play back the image you made of your disk. If you compress your image using gzip or bzip2 you can easily store it somewhere (other disk, cd, dvd, etc)


I was thinking of the original drive. If I make it 8Gb and leave slop, It should then fit on any of the other 8.4Gb drives if they do not have bad sectors.

I'll study up on dd........I've seen others refer to it as "disk destroyer".
Profile Andre Kerstens
Forum moderator
Project tester
Volunteer tester
Avatar

Joined: Sep 11 06
Posts: 749
ID: 1
Credit: 15,199
RAC: 0
Message 2598 - Posted 27 Feb 2007 15:02:14 UTC - in response to Message ID 2595 .


I'll study up on dd........I've seen others refer to it as "disk destroyer".


I've been using it for years and never (cross my fingers) had a single problem with it. It's rescue tool number two in my toolkit after rsync that I use for my backups (disk-to-disk).

AK
____________
D@H the greatest project in the world... a while from now!

Message boards : Unix/Linux : HD clone

Database Error
: The MySQL server is running with the --read-only option so it cannot execute this statement
array(3) {
  [0]=>
  array(7) {
    ["file"]=>
    string(47) "/boinc/projects/docking/html_v2/inc/db_conn.inc"
    ["line"]=>
    int(97)
    ["function"]=>
    string(8) "do_query"
    ["class"]=>
    string(6) "DbConn"
    ["object"]=>
    object(DbConn)#12 (2) {
      ["db_conn"]=>
      resource(60) of type (mysql link persistent)
      ["db_name"]=>
      string(7) "docking"
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(1) {
      [0]=>
      &string(51) "update DBNAME.thread set views=views+1 where id=187"
    }
  }
  [1]=>
  array(7) {
    ["file"]=>
    string(48) "/boinc/projects/docking/html_v2/inc/forum_db.inc"
    ["line"]=>
    int(60)
    ["function"]=>
    string(6) "update"
    ["class"]=>
    string(6) "DbConn"
    ["object"]=>
    object(DbConn)#12 (2) {
      ["db_conn"]=>
      resource(60) of type (mysql link persistent)
      ["db_name"]=>
      string(7) "docking"
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(3) {
      [0]=>
      object(BoincThread)#3 (16) {
        ["id"]=>
        string(3) "187"
        ["forum"]=>
        string(1) "6"
        ["owner"]=>
        string(3) "339"
        ["status"]=>
        string(1) "0"
        ["title"]=>
        string(8) "HD clone"
        ["timestamp"]=>
        string(10) "1172588541"
        ["views"]=>
        string(4) "2325"
        ["replies"]=>
        string(1) "6"
        ["activity"]=>
        string(20) "1.2425608043181e-123"
        ["sufferers"]=>
        string(1) "0"
        ["score"]=>
        string(1) "0"
        ["votes"]=>
        string(1) "0"
        ["create_time"]=>
        string(10) "1172532646"
        ["hidden"]=>
        string(1) "0"
        ["sticky"]=>
        string(1) "0"
        ["locked"]=>
        string(1) "0"
      }
      [1]=>
      &string(6) "thread"
      [2]=>
      &string(13) "views=views+1"
    }
  }
  [2]=>
  array(7) {
    ["file"]=>
    string(63) "/boinc/projects/docking/html_v2/user/community/forum/thread.php"
    ["line"]=>
    int(184)
    ["function"]=>
    string(6) "update"
    ["class"]=>
    string(11) "BoincThread"
    ["object"]=>
    object(BoincThread)#3 (16) {
      ["id"]=>
      string(3) "187"
      ["forum"]=>
      string(1) "6"
      ["owner"]=>
      string(3) "339"
      ["status"]=>
      string(1) "0"
      ["title"]=>
      string(8) "HD clone"
      ["timestamp"]=>
      string(10) "1172588541"
      ["views"]=>
      string(4) "2325"
      ["replies"]=>
      string(1) "6"
      ["activity"]=>
      string(20) "1.2425608043181e-123"
      ["sufferers"]=>
      string(1) "0"
      ["score"]=>
      string(1) "0"
      ["votes"]=>
      string(1) "0"
      ["create_time"]=>
      string(10) "1172532646"
      ["hidden"]=>
      string(1) "0"
      ["sticky"]=>
      string(1) "0"
      ["locked"]=>
      string(1) "0"
    }
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(1) {
      [0]=>
      &string(13) "views=views+1"
    }
  }
}
query: update docking.thread set views=views+1 where id=187