Clone 200GB Linux Harddisk - Linux

This is a discussion on Clone 200GB Linux Harddisk - Linux ; Any advice to clone a 8-partition harddisk (all Linux partitions)? Pls kindly show me specific commands which can be useful. Any MS Windows program to clone Linux harddisk? Highly appreciated if you can reply by email as well. Thanks a ...

+ Reply to Thread
Results 1 to 16 of 16

Thread: Clone 200GB Linux Harddisk

  1. Clone 200GB Linux Harddisk

    Any advice to clone a 8-partition harddisk (all Linux partitions)?
    Pls kindly show me specific commands which can be useful.

    Any MS Windows program to clone Linux harddisk?

    Highly appreciated if you can reply by email as well.
    Thanks a lot.
    --------------------------------
    My Email: klistsmith@hotmail.com


  2. Re: Clone 200GB Linux Harddisk

    >Any advice to clone a 8-partition harddisk (all Linux partitions)?
    What is it that you are trying to accomplish? If you want to reinstall
    an OS, in most distros, you have the option to mount a partition
    without formatting. If you can elaborate on your desired end result,
    a proper solution will be easier to provide.


  3. Re: Clone 200GB Linux Harddisk

    The purpose is to make exact duplicate of a source harddisk which
    contains 8 partitions.

    I just want to duplicate it for parallel testing.
    Hope to hear your advice. Thanks.

    jamie@nospam.com wrote:
    >>Any advice to clone a 8-partition harddisk (all Linux partitions)?

    >
    > What is it that you are trying to accomplish? If you want to reinstall
    > an OS, in most distros, you have the option to mount a partition
    > without formatting. If you can elaborate on your desired end result,
    > a proper solution will be easier to provide.



  4. Re: Clone 200GB Linux Harddisk

    The purpose is to make exact duplicate of a source harddisk which
    contains 8 partitions.

    I just want to duplicate it for parallel testing.
    Hope to hear your advice. Thanks.

    jamie@nospam.com wrote:
    >>Any advice to clone a 8-partition harddisk (all Linux partitions)?

    >
    > What is it that you are trying to accomplish? If you want to reinstall
    > an OS, in most distros, you have the option to mount a partition
    > without formatting. If you can elaborate on your desired end result,
    > a proper solution will be easier to provide.




  5. Re: Clone 200GB Linux Harddisk

    The purpose is to make exact duplicate of a source harddisk which
    contains 8 partitions.

    I just want to duplicate it for parallel testing.
    Hope to hear your advice. Thanks.

    jamie@nospam.com wrote:
    >>Any advice to clone a 8-partition harddisk (all Linux partitions)?

    >
    > What is it that you are trying to accomplish? If you want to reinstall
    > an OS, in most distros, you have the option to mount a partition
    > without formatting. If you can elaborate on your desired end result,
    > a proper solution will be easier to provide.




  6. Re: Clone 200GB Linux Harddisk

    Now I have a new harddisk of the same model. How can I make exact
    partition structure in the new harddisk?

    Read the structure in the old harddisk and create it one by one in the
    new harddisk?

    Regards,

    Jaroslaw Zachwieja wrote:

    > Klist Smith wrote:
    >
    >
    >>Any advice to clone a 8-partition harddisk (all Linux partitions)?

    >
    >
    > Connect source disk as "Primary, Master" and destination disk as "Primary,
    > Slave". Then issue the following command:
    >
    > dd if=/dev/hda of=/dev/hdb bs=4k
    >
    > It will take some time, but you will get exact copy. This ofcourse assumes,
    > that the disks are identical (size, geometry).
    >
    > Regards,



  7. Re: Clone 200GB Linux Harddisk

    On Thu, 03 Mar 2005 12:52:53 +0800, Klist Smith wrote:

    > Now I have a new harddisk of the same model. How can I make exact
    > partition structure in the new harddisk?
    >
    > Read the structure in the old harddisk and create it one by one in the
    > new harddisk?
    >
    > Regards,
    >
    > Jaroslaw Zachwieja wrote:
    >
    >> Klist Smith wrote:
    >>
    >>
    >>>Any advice to clone a 8-partition harddisk (all Linux partitions)?

    >>
    >>
    >> Connect source disk as "Primary, Master" and destination disk as "Primary,
    >> Slave". Then issue the following command:
    >>
    >> dd if=/dev/hda of=/dev/hdb bs=4k
    >>
    >> It will take some time, but you will get exact copy. This ofcourse assumes,
    >> that the disks are identical (size, geometry).
    >>
    >> Regards,


    The advice Jaroslaw Zachwieja gave is exactly what you want. You don't
    have to set up the partition structure or anything. "dd" works at a lower
    abstraction level than that. It copies the raw bits directly from one
    drive to the other, this includes, MBR, partition tables, and anything
    else (including garbage from deleted files) that is one it.

    The only way I can imagine that it would fail would be if you had really
    old drives that didn't hide bad blocks behind a firmware level. That is
    really unlikely. (In that case you would have to avoid using bad blocks on
    the disk copied to.) (Even if the disks aren't identical, it still might
    work. Though there is no guarantee, and the destination disk must be large
    enough to receive whatever you write to it.)

    --
    Thomas D. Shepard
    I am sorry, but you can't email me.
    ImaSpammer@spam.sux is not a real email address. I figure if someone wants to
    harvest an email address to use for sending spam, they may as well use this one.

  8. Re: Clone 200GB Linux Harddisk


    "Thomas D. Shepard" wrote in message
    newsan.2005.03.03.06.41.36.292328@spam.sux...
    > On Thu, 03 Mar 2005 12:52:53 +0800, Klist Smith wrote:
    >
    >> Now I have a new harddisk of the same model. How can I make exact
    >> partition structure in the new harddisk?
    >>
    >> Read the structure in the old harddisk and create it one by one in the
    >> new harddisk?
    >>
    >> Regards,
    >>
    >> Jaroslaw Zachwieja wrote:
    >>
    >>> Klist Smith wrote:
    >>>
    >>>
    >>>>Any advice to clone a 8-partition harddisk (all Linux partitions)?
    >>>
    >>>
    >>> Connect source disk as "Primary, Master" and destination disk as
    >>> "Primary,
    >>> Slave". Then issue the following command:
    >>>
    >>> dd if=/dev/hda of=/dev/hdb bs=4k
    >>>
    >>> It will take some time, but you will get exact copy. This ofcourse
    >>> assumes,
    >>> that the disks are identical (size, geometry).
    >>>
    >>> Regards,

    >
    > The advice Jaroslaw Zachwieja gave is exactly what you want. You don't
    > have to set up the partition structure or anything. "dd" works at a lower
    > abstraction level than that. It copies the raw bits directly from one
    > drive to the other, this includes, MBR, partition tables, and anything
    > else (including garbage from deleted files) that is one it.


    dd is usually a very, very foolish way to copy such a large disk. It will in
    some cases copy bad blocks, it will take forever, and if you have even
    slight differences in disk geometries such as the new disk being a few
    blocks smaller, it will corrupt your file system. Remember that dd copies
    every block, and will also copy the blocks that are discarded and contain
    nothing you want.

    You might try copying the first 10 blocks to get the partition tables, then
    duplicate the file systems by using mkfs to create new file systems and
    using cp -a or rsync to duplicate the contents to the new disks. It takes
    time and knowledge to set up, but it is easily 100 times faster than
    byte-copying a 200 Gig disk.




  9. Re: Clone 200GB Linux Harddisk


    Klist Smith wrote:
    > Any advice to clone a 8-partition harddisk (all Linux partitions)?
    > Pls kindly show me specific commands which can be useful.
    >
    > Any MS Windows program to clone Linux harddisk?
    >
    > Highly appreciated if you can reply by email as well.
    > Thanks a lot.


    There was a google advert next to your message:
    http://www.acronis.com/homecomputing...l?ad=A01010311
    I know nothing about it, but it does have a free trial download!


  10. Re: Clone 200GB Linux Harddisk

    In comp.os.linux.setup, Klist Smith

    wrote
    on Wed, 02 Mar 2005 17:40:54 +0800
    <42258a0f$1_2@news.tm.net.my>:
    > Any advice to clone a 8-partition harddisk (all Linux partitions)?
    > Pls kindly show me specific commands which can be useful.
    >
    > Any MS Windows program to clone Linux harddisk?
    >
    > Highly appreciated if you can reply by email as well.
    > Thanks a lot.
    > --------------------------------
    > My Email: klistsmith@hotmail.com
    >


    Not sure how well Windows can handle the cloning of Linux
    data unless the partitions are *exactly* the same size.
    Here is a more flexible alternative.

    If you're using GRUB and a Linux system, the simplest way I
    can think of is:

    [1] Physically install harddrive. For purposes of this
    discussion I'll assume your original harddrive
    is at /dev/hda and your new one is /dev/hdd.

    [2] Boot Linux. (You can even boot from the hardrive
    you're about to clone; the main issue is that certain
    log files might look a bit funny on the clonee, and
    there may be some leftover stuff in /tmp and /var/tmp.
    Make sure to mount /boot if you need to; it's usually
    left unmounted as a security precaution.
    If you want, you can boot from a LiveCD or even set up
    something diskless; the main difference is that you'll
    have to mount the source drive tree somewhere in step
    [6], so that you can copy it properly in step [7].
    If you're slightly paranoid you can mount the source
    drive partitions read-only.)

    [3] Create desired partitions on the new harddrive.
    I use fdisk, but there are others out there.
    Make sure to use the Linux fdisk, if you use fdisk;
    the DOS FDISK.EXE doesn't know about Linux partition types.

    [4] Create desired filesystems on the new harddrive.
    mkfs.ext2, mkfs.reiserfs, and mkfs.jfs are typical.

    [5] Mount the root partition of the new drive, and create the
    directories necessary to mount the other partitions.
    We'll assume it's mounted at /other .

    [6] Mount the other partitions underneath /other.

    [7] You should now be able to do

    cd /
    tar clf - / /mp1 /mp2 ... /mpn | (cd /other; tar xf -)

    where /mp1 /mp2, etc. are your existing mountpoints, which
    may include / if you're cloning your running system drive.

    The 'l' is important, otherwise might get a lot of
    stuff one doesn't need (if one has /usr mounted
    and one does a 'tar clf - /', one will not get /usr).

    [8] You're done as far as the actual copy is concerned. If you
    need to, unmount the new drive, shut down, and/or move the
    drive to its final location (e.g. another machine that
    you're constructing).

    I've had to do almost exactly this (my old system drive
    was making horrible noises and was near death), and apart
    from some issues regarding booting, as GRUB wasn't on the
    new system (which means I had to use a universal GRUB boot
    disk; see the GRUB instructions on how to make one and
    lots of other options), it worked fine, except for the
    few files which the original drive had blasted already
    with bad blocks.

    So keep this in mind if you're trying to image something
    that you want to boot - and my setup didn't include a
    Windows partition so I didn't have to worry regarding
    its peculiarities.

    --
    #191, ewill3@earthlink.net
    It's still legal to go .sigless.

  11. Re: Clone 200GB Linux Harddisk

    In comp.os.linux.misc Klist Smith wrote:
    > Any advice to clone a 8-partition harddisk (all Linux partitions)?
    > Pls kindly show me specific commands which can be useful.
    >
    > Any MS Windows program to clone Linux harddisk?
    >
    > Highly appreciated if you can reply by email as well.
    > Thanks a lot.
    > --------------------------------
    > My Email: klistsmith@hotmail.com
    >



    I recently cloned a 60GB Linux disk.
    Here is what I did.

    /dev/hda is the original RH ES2 disk with several Linux partitions.
    /dev/hdb is new blank 60GB harddrive.

    I booted the system from a Slackware Linux CD, it could be any Linux CD, and
    ran following command:

    dd if=/dev/hda of=/dev/hdb bs=20m


    I was able to boot the system from either drive.


    --
    Hemant Shah /"\ ASCII ribbon campaign
    E-mail: NoJunkMailshah@xnet.com \ / ---------------------
    X against HTML mail
    TO REPLY, REMOVE NoJunkMail / \ and postings
    FROM MY E-MAIL ADDRESS.
    -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
    I haven't lost my mind, Above opinions are mine only.
    it's backed up on tape somewhere. Others can have their own.

  12. Re: Clone 200GB Linux Harddisk


    "Hemant Shah" wrote in message
    news:d0puc1$58c$1@new7.xnet.com...
    > In comp.os.linux.misc Klist Smith wrote:
    >> Any advice to clone a 8-partition harddisk (all Linux partitions)?
    >> Pls kindly show me specific commands which can be useful.
    >>
    >> Any MS Windows program to clone Linux harddisk?
    >>
    >> Highly appreciated if you can reply by email as well.
    >> Thanks a lot.
    >> --------------------------------
    >> My Email: klistsmith@hotmail.com
    >>

    >
    >
    > I recently cloned a 60GB Linux disk.
    > Here is what I did.
    >
    > /dev/hda is the original RH ES2 disk with several Linux partitions.
    > /dev/hdb is new blank 60GB harddrive.
    >
    > I booted the system from a Slackware Linux CD, it could be any Linux CD,
    > and
    > ran following command:
    >
    > dd if=/dev/hda of=/dev/hdb bs=20m
    >
    >
    > I was able to boot the system from either drive.


    Congratulations. You copied every byte, even if there was no file in it, you
    copied a partition table that probably doesn't match your new hardware, you
    copied your old swap file, it doesn't work if the new drive is at all
    smaller, and it will completely futz up your partition boundaries if the
    geometre of your other disk is noticeably different than the geometry of
    your old disk.

    It also takes roughly 10 times as long as generatinig the partition tables
    and partitions and duplicating the contents from one to the other.

    But hey, I've only done this trick with over 10,000 machines and cut the
    corresponding OS installation time from over 3 hours for a 10 Gig disk to 30
    minutes. What the heck would I know about it?



  13. Re: Clone 200GB Linux Harddisk

    Nedavno Klist Smith pise:

    | Any advice to clone a 8-partition harddisk (all Linux partitions)?
    | Pls kindly show me specific commands which can be useful.

    Attached is what I found when I bought new HDD, and wanted to clone my
    HDD. It's for RedHat/Fedora, but basics are there.


    --
    ___ ____
    /__/ / \ ** Registrovani korisnik Linuksa #291606 **
    / / \/ /\ \ ** Registered Linux user #291606 **
    /__/\____/--\__\ ** http://counter.li.org/ **


  14. Re: Clone 200GB Linux Harddisk

    In comp.os.linux.misc Nico Kadel-Garcia wrote:
    >
    > "Hemant Shah" wrote in message
    > news:d0puc1$58c$1@new7.xnet.com...
    >> In comp.os.linux.misc Klist Smith wrote:
    >>> Any advice to clone a 8-partition harddisk (all Linux partitions)?
    >>> Pls kindly show me specific commands which can be useful.
    >>>
    >>> Any MS Windows program to clone Linux harddisk?
    >>>
    >>> Highly appreciated if you can reply by email as well.
    >>> Thanks a lot.
    >>> --------------------------------
    >>> My Email: klistsmith@hotmail.com
    >>>

    >>
    >>
    >> I recently cloned a 60GB Linux disk.
    >> Here is what I did.
    >>
    >> /dev/hda is the original RH ES2 disk with several Linux partitions.
    >> /dev/hdb is new blank 60GB harddrive.
    >>
    >> I booted the system from a Slackware Linux CD, it could be any Linux CD,
    >> and
    >> ran following command:
    >>
    >> dd if=/dev/hda of=/dev/hdb bs=20m
    >>
    >>
    >> I was able to boot the system from either drive.

    >
    > Congratulations. You copied every byte, even if there was no file in it, you
    > copied a partition table that probably doesn't match your new hardware, you
    > copied your old swap file, it doesn't work if the new drive is at all
    > smaller, and it will completely futz up your partition boundaries if the
    > geometre of your other disk is noticeably different than the geometry of
    > your old disk.
    >
    > It also takes roughly 10 times as long as generatinig the partition tables
    > and partitions and duplicating the contents from one to the other.
    >
    > But hey, I've only done this trick with over 10,000 machines and cut the
    > corresponding OS installation time from over 3 hours for a 10 Gig disk to 30
    > minutes. What the heck would I know about it?


    As I mentioned both the drives are same, in fact they are identical, so the
    above procedure work. It took less than hours to clone the disk. What do I
    care if it copied partition even if there were no files in it or swap
    partition. I am able to boot from either drive. I have about 4 of my systems
    setup that way, and one time I was able to recover from it. It is a good
    idea if you want 2 identical systems or a backup dirve in case one fails.

    >
    >


    --
    Hemant Shah /"\ ASCII ribbon campaign
    E-mail: NoJunkMailshah@xnet.com \ / ---------------------
    X against HTML mail
    TO REPLY, REMOVE NoJunkMail / \ and postings
    FROM MY E-MAIL ADDRESS.
    -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
    I haven't lost my mind, Above opinions are mine only.
    it's backed up on tape somewhere. Others can have their own.

  15. Re: Clone 200GB Linux Harddisk


    "Hemant Shah" wrote in message
    news:d0sal6$n0a$1@new7.xnet.com...

    > As I mentioned both the drives are same, in fact they are identical, so
    > the
    > above procedure work. It took less than hours to clone the disk. What do I
    > care if it copied partition even if there were no files in it or swap
    > partition. I am able to boot from either drive. I have about 4 of my
    > systems
    > setup that way, and one time I was able to recover from it. It is a good
    > idea if you want 2 identical systems or a backup dirve in case one fails.


    OK, besides the problems I already mentioned, files that were in the process
    of being written at any time during that 2 hours may be corrupt. Log files,
    system files, or directory structures may be corrupted. This especially
    includes database files such as, oh, say, your /etc/passwd file if anyone
    was changing their password while this occurred. That's fine if you're in
    single user mode and the system was sync'ed and kept that way. But to do it
    really reliably requires going to run level 1, making sure you don't change
    *ANYTHING* important while this is occurring, and better yet remounting all
    your partitions as "read-only" and doing "sync" to make sure the file system
    in the operating system has really been written to disk for access at that
    harsh level.

    And by the time you've done all that, you could probably have imaged it via
    file systems at least half-a-dozen or more times, especially if your disk
    isn't heavily populated.



  16. Re: Clone 200GB Linux Harddisk

    Nico Kadel-Garcia wrote:
    > "Hemant Shah" wrote in message
    > news:d0sal6$n0a$1@new7.xnet.com...
    >
    >
    >>As I mentioned both the drives are same, in fact they are identical, so
    >>the
    >>above procedure work. It took less than hours to clone the disk. What do I
    >>care if it copied partition even if there were no files in it or swap
    >>partition. I am able to boot from either drive. I have about 4 of my
    >>systems
    >>setup that way, and one time I was able to recover from it. It is a good
    >>idea if you want 2 identical systems or a backup dirve in case one fails.

    >
    >
    > OK, besides the problems I already mentioned, files that were in the process
    > of being written at any time during that 2 hours may be corrupt. Log files,
    > system files, or directory structures may be corrupted. This especially
    > includes database files such as, oh, say, your /etc/passwd file if anyone
    > was changing their password while this occurred. That's fine if you're in
    > single user mode and the system was sync'ed and kept that way. But to do it
    > really reliably requires going to run level 1, making sure you don't change
    > *ANYTHING* important while this is occurring, and better yet remounting all
    > your partitions as "read-only" and doing "sync" to make sure the file system
    > in the operating system has really been written to disk for access at that
    > harsh level.


    He's booting from a Linux CD. Doesn't have to "remount read-only"
    because he doesn't have to mount period.

    > And by the time you've done all that, you could probably have imaged it via
    > file systems at least half-a-dozen or more times, especially if your disk
    > isn't heavily populated.


    He doesn't need to image it a half-a-dozen (or more) times. Watch a
    movie, the time will go by quick :-)

    -shannon

+ Reply to Thread