mirror-ing hda to hdb - Debian

This is a discussion on mirror-ing hda to hdb - Debian ; Hi all. I would like to make hdb (120GB WD brand) a drop in replacement for hda (120GB WD brand). Is 'dd' the best way to go on this, do I partition ahead or not? TYIA for any and all ...

+ Reply to Thread
Results 1 to 14 of 14

Thread: mirror-ing hda to hdb

  1. mirror-ing hda to hdb

    Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    partition ahead or not? TYIA for any and all advice.
    --
    dw



  2. Re: mirror-ing hda to hdb

    On Sat, 17 Dec 2005 16:55:20 -0500, linxlvr wrote:

    > Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    > for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    > partition ahead or not? TYIA for any and all advice.


    I believe if you look at 'raid' you'll find that one of the levels
    basically does that.


  3. Re: mirror-ing hda to hdb

    On Sat, 17 Dec 2005 18:29:48 -0700, ray wrote:

    > On Sat, 17 Dec 2005 16:55:20 -0500, linxlvr wrote:
    >
    >> Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    >> for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    >> partition ahead or not? TYIA for any and all advice.

    >
    > I believe if you look at 'raid' you'll find that one of the levels
    > basically does that.

    Thanks. Call me chicken, but I don't really want to get involved in raid
    setups yet. I was just looking for a one time backup of a really clean
    install. Then I can experiment w/ stuff w/ a greater margin for error.
    :-)
    Thanks agian though.
    -- dw


  4. Re: mirror-ing hda to hdb

    linxlvr wrote:

    >On Sat, 17 Dec 2005 18:29:48 -0700, ray wrote:
    >
    >> On Sat, 17 Dec 2005 16:55:20 -0500, linxlvr wrote:
    >>
    >>> Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    >>> for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    >>> partition ahead or not? TYIA for any and all advice.

    >>
    >> I believe if you look at 'raid' you'll find that one of the levels
    >> basically does that.

    >Thanks. Call me chicken, but I don't really want to get involved in raid
    >setups yet. I was just looking for a one time backup of a really clean
    >install. Then I can experiment w/ stuff w/ a greater margin for error.
    >:-)
    >Thanks agian though.
    >-- dw
    >



    how about rsync? i use it for backups from one disk to another..

    keith

  5. Re: mirror-ing hda to hdb

    linxlvr wrote:
    > Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    > for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    > partition ahead or not? TYIA for any and all advice.
    > --
    > dw
    >
    >

    Hi, i am not a linux Guru, but wouldn't use dd. If you use dd to
    transfer binary data, something like dd if=/dev/hda of=/dev/hdb
    then you'll be in trouble if the disk geometry (number of sectors,
    cylinders and all this low level stuff) isn't completely the same on
    both of your disks, at least this is my understanding.
    I would personally try to use tar command. So create disk layout on the
    new disk first and then boot from some USB or CD and mount the
    partitions on both disks.
    # mount -r /dev/hda1 /mnt/my_hda # Mount the source read only
    # mount /dev/hdb1 /mnt/my_hdb # Mount the destination

    Afterwards you need to give some command like that:
    # tar cf - -C /mnt/my_hda | tar xf - -C /mnt/my_hdb

    Please be carefully and try it first on some small test data, i havn't
    done such things for a long time now.

    Cheers
    *Andreas

  6. Re: mirror-ing hda to hdb

    On Sun, 18 Dec 2005 13:52:03 +0100, Andreas Lorenz wrote:

    > linxlvr wrote:
    >> Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    >> for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    >> partition ahead or not? TYIA for any and all advice.
    >> --
    >> dw
    >>
    >>

    > Hi, i am not a linux Guru, but wouldn't use dd. If you use dd to
    > transfer binary data, something like dd if=/dev/hda of=/dev/hdb
    > then you'll be in trouble if the disk geometry (number of sectors,
    > cylinders and all this low level stuff) isn't completely the same on
    > both of your disks, at least this is my understanding.
    > I would personally try to use tar command. So create disk layout on the
    > new disk first and then boot from some USB or CD and mount the
    > partitions on both disks.
    > # mount -r /dev/hda1 /mnt/my_hda # Mount the source read only
    > # mount /dev/hdb1 /mnt/my_hdb # Mount the destination
    >
    > Afterwards you need to give some command like that:
    > # tar cf - -C /mnt/my_hda | tar xf - -C /mnt/my_hdb
    >
    > Please be carefully and try it first on some small test data, i havn't
    > done such things for a long time now.
    >
    > Cheers
    > *Andreas


    Is there a reason I can't just copy hda when using it also?
    TYIA
    --
    dw


  7. Re: mirror-ing hda to hdb

    On Sun, 18 Dec 2005 11:46:55 +0000, keith wrote:

    > linxlvr wrote:
    >
    >>On Sat, 17 Dec 2005 18:29:48 -0700, ray wrote:
    >>
    >>> On Sat, 17 Dec 2005 16:55:20 -0500, linxlvr wrote:
    >>>
    >>>> Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    >>>> for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    >>>> partition ahead or not? TYIA for any and all advice.
    >>>
    >>> I believe if you look at 'raid' you'll find that one of the levels
    >>> basically does that.

    >>Thanks. Call me chicken, but I don't really want to get involved in raid
    >>setups yet. I was just looking for a one time backup of a really clean
    >>install. Then I can experiment w/ stuff w/ a greater margin for error.
    >>:-)
    >>Thanks agian though.
    >>-- dw
    >>

    >
    >
    > how about rsync? i use it for backups from one disk to another..
    >
    > keith

    I've never used rsync, but I will give it a go. Can I rsync from a disk
    running the OS or should I boot from a rescue and mount the source drive &
    the destination drive.
    TYIA.
    --
    dw


  8. Re: mirror-ing hda to hdb

    linxlvr wrote:

    >On Sun, 18 Dec 2005 11:46:55 +0000, keith wrote:

    - snip

    >> how about rsync? i use it for backups from one disk to another..
    >>
    >> keith

    >I've never used rsync, but I will give it a go. Can I rsync from a disk
    >running the OS or should I boot from a rescue and mount the source drive &
    >the destination drive.
    >TYIA.
    >--
    >dw
    >


    cant answer that one.. depends what you want to do with the data...

    rsync is really good for repeatedly copying files... it skips the
    ones that dont need copying.

    if its a *one-off*, then you could also use cp ?

    keith

  9. Re: mirror-ing hda to hdb

    linxlvr wrote:
    > Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    > for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    > partition ahead or not? TYIA for any and all advice.
    > --
    > dw
    >
    >


    I'd probably use partimage (www.partimage.org) to do that. Boot up off a
    linux live cd, eg Knoppix, and use partimage to backup any wanted
    partitions on hda to backup archive files on hdb. Depending on whether
    or not the live cd has partimage installed, you may need to apt-get it
    first. Unlike dd, it won't copy unused areas of the source disk, so
    you'll generally end up with a much smaller archive than you can get
    with dd. It'll also compress the archive on the fly if you choose.
    That'll let you use most of hdb for other stuff, and restoring the
    backup is as simple as booting off the live disc again, and using
    partimage to restore the backup files from hdb to the various partitions
    on hda.
    No, this isn't a mirroring solution, but it's just as simple and
    probably a better use of your disk space.

    Shannon

  10. Re: mirror-ing hda to hdb

    On Mon, 19 Dec 2005 16:52:20 +0000, keith wrote:

    > linxlvr wrote:
    >
    >>On Sun, 18 Dec 2005 11:46:55 +0000, keith wrote:

    > - snip
    >
    >>> how about rsync? i use it for backups from one disk to another..
    >>>
    >>> keith

    >>I've never used rsync, but I will give it a go. Can I rsync from a disk
    >>running the OS or should I boot from a rescue and mount the source drive &
    >>the destination drive.
    >>TYIA.
    >>--
    >>dw
    >>

    >
    > cant answer that one.. depends what you want to do with the data...
    >
    > rsync is really good for repeatedly copying files... it skips the
    > ones that dont need copying.
    >
    > if its a *one-off*, then you could also use cp ?
    >
    > keith

    During 2.4 days running gentoo i believe I did this, #cp -aR foo_stuff but
    I tried this recently w/ my deb sarge running 2.6 and it hung during dev.
    Didn't know if there was some prob w/ using such method w/ udev or some
    such thing.

    --
    dw


  11. Re: mirror-ing hda to hdb

    On Tue, 20 Dec 2005 08:09:20 +1030, Shannon Lloyd wrote:

    > linxlvr wrote:
    >> Hi all. I would like to make hdb (120GB WD brand) a drop in replacement
    >> for hda (120GB WD brand). Is 'dd' the best way to go on this, do I
    >> partition ahead or not? TYIA for any and all advice.
    >> --
    >> dw
    >>
    >>

    >
    > I'd probably use partimage (www.partimage.org) to do that. Boot up off a
    > linux live cd, eg Knoppix, and use partimage to backup any wanted
    > partitions on hda to backup archive files on hdb. Depending on whether
    > or not the live cd has partimage installed, you may need to apt-get it
    > first. Unlike dd, it won't copy unused areas of the source disk, so
    > you'll generally end up with a much smaller archive than you can get
    > with dd. It'll also compress the archive on the fly if you choose.
    > That'll let you use most of hdb for other stuff, and restoring the
    > backup is as simple as booting off the live disc again, and using
    > partimage to restore the backup files from hdb to the various partitions
    > on hda.
    > No, this isn't a mirroring solution, but it's just as simple and
    > probably a better use of your disk space.
    >
    > Shannon

    TY.
    --
    dw


  12. Re: mirror-ing hda to hdb

    On Mon, 19 Dec 2005 16:43:17 -0500, linxlvr wrote:

    > On Mon, 19 Dec 2005 16:52:20 +0000, keith wrote:
    >
    >> linxlvr wrote:
    >>
    >>>On Sun, 18 Dec 2005 11:46:55 +0000, keith wrote:

    >> - snip
    >>
    >>>> how about rsync? i use it for backups from one disk to another..
    >>>>
    >>>> keith
    >>>I've never used rsync, but I will give it a go. Can I rsync from a disk
    >>>running the OS or should I boot from a rescue and mount the source drive &
    >>>the destination drive.
    >>>TYIA.
    >>>--
    >>>dw
    >>>

    >>
    >> cant answer that one.. depends what you want to do with the data...
    >>
    >> rsync is really good for repeatedly copying files... it skips the
    >> ones that dont need copying.
    >>
    >> if its a *one-off*, then you could also use cp ?
    >>
    >> keith

    > During 2.4 days running gentoo i believe I did this, #cp -aR foo_stuff but
    > I tried this recently w/ my deb sarge running 2.6 and it hung during dev.
    > Didn't know if there was some prob w/ using such method w/ udev or some
    > such thing.

    I booted now from an MDK 8.2 rescue CD, made dirs, mounted hda1 & hdb1,
    did cp -aR foo foo and worked fine. I did hda5 & hdb5 and it hung
    seemingly. (45 minutes of running) partition 5 is /usr on these drives.
    rsync was not availible on the rescue cd. Ideas?
    -- dw


  13. Re: mirror-ing hda to hdb

    linxlvr wrote:

    >On Mon, 19 Dec 2005 16:43:17 -0500, linxlvr wrote:
    >
    >> On Mon, 19 Dec 2005 16:52:20 +0000, keith wrote:
    >>
    >>> linxlvr wrote:
    >>>
    >>>>On Sun, 18 Dec 2005 11:46:55 +0000, keith wrote:
    >>> - snip
    >>>
    >>>>> how about rsync? i use it for backups from one disk to another..
    >>>>>
    >>>>> keith
    >>>>I've never used rsync, but I will give it a go. Can I rsync from a disk
    >>>>running the OS or should I boot from a rescue and mount the source drive &
    >>>>the destination drive.
    >>>>TYIA.
    >>>>--
    >>>>dw
    >>>>
    >>>
    >>> cant answer that one.. depends what you want to do with the data...
    >>>
    >>> rsync is really good for repeatedly copying files... it skips the
    >>> ones that dont need copying.
    >>>
    >>> if its a *one-off*, then you could also use cp ?
    >>>
    >>> keith

    >> During 2.4 days running gentoo i believe I did this, #cp -aR foo_stuff but
    >> I tried this recently w/ my deb sarge running 2.6 and it hung during dev.
    >> Didn't know if there was some prob w/ using such method w/ udev or some
    >> such thing.

    >I booted now from an MDK 8.2 rescue CD, made dirs, mounted hda1 & hdb1,
    >did cp -aR foo foo and worked fine. I did hda5 & hdb5 and it hung
    >seemingly. (45 minutes of running) partition 5 is /usr on these drives.
    >rsync was not availible on the rescue cd. Ideas?
    > -- dw
    >



    you may have a problem with the files??? im curious though,,,
    quite often hdb5 is an "extended partition".. this may notbe the
    case with you, but still id be interested to see the results of fdisk
    -l

    keith

  14. Re: mirror-ing hda to hdb

    In message <43a88e19.8199682@news.iol.ie>, keith writes
    ....
    >you may have a problem with the files??? im curious though,,,
    >quite often hdb5 is an "extended partition".. this may notbe the
    >case with you, but still id be interested to see the results of fdisk


    hdb5 *always* lies in the extended partition.

    --
    Jeremy Boden

+ Reply to Thread