Linux Debian support - mirror-ing hda to hdb

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > December 2005 > mirror-ing hda to hdb





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mirror-ing hda to hdb
linxlvr

2005-12-17, 5:47 pm

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


ray

2005-12-17, 8:45 pm

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.

linxlvr

2005-12-18, 2:46 am

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

> On Sat, 17 Dec 2005 16:55:20 -0500, linxlvr wrote:
>
>
> 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

keith

2005-12-18, 7:46 am

linxlvr <linxlvr@netscape.net> wrote:

>On Sat, 17 Dec 2005 18:29:48 -0700, ray wrote:
>
>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
Andreas Lorenz

2005-12-18, 7:46 am

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
linxlvr

2005-12-18, 8:46 pm

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

> linxlvr wrote:
> 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

linxlvr

2005-12-18, 8:46 pm

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

> linxlvr <linxlvr@netscape.net> wrote:
>
>
>
> 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

keith

2005-12-19, 5:48 pm

linxlvr <linxlvr@netscape.net> wrote:

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

- snip

>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
Shannon Lloyd

2005-12-19, 5:48 pm

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
linxlvr

2005-12-19, 5:48 pm

MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: u1010293.ul.warwick.net
X-Original-NNTP-Posting-Host: u1010293.ul.warwick.net
X-Trace: news1.warwick.net 1135028488 u1010293.ul.warwick.net (19 Dec 2005 16:41:28 -0500)
Lines: 34
X-Complaints-To: abuse@warwick.net
Path: border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!newsfeed.kamp.net!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!194.100.2.60.MISMATCH!fi.sn.net!newsfeed2.fi.sn.net!feeder2.news.j
ippii.net!feeder1.news.jippii.net!nntp.inet.fi!inet.fi!uunet!spool.news.uu.net!ash.uu.net!news1.warwick.net
Xref: number1.nntp.dca.giganews.com alt.os.linux.debian:3042

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

> linxlvr <linxlvr@netscape.net> wrote:
>
> - snip
>
>
> 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

linxlvr

2005-12-19, 5:48 pm

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

> linxlvr wrote:
>
> 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

linxlvr

2005-12-20, 5:48 pm

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

> On Mon, 19 Dec 2005 16:52:20 +0000, keith wrote:
>
> 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

keith

2005-12-20, 5:48 pm

linxlvr <linxlvr@netscape.net> wrote:

>On Mon, 19 Dec 2005 16:43:17 -0500, linxlvr wrote:
>
>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
Jeremy Boden

2005-12-20, 5:48 pm

In message <43a88e19.8199682@news.iol.ie>, keith <here@earth.net> 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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com