cp dev/hda dev/hdb

cp dev/hda dev/hdb

Post by RICK M GOLDBE » Sat, 20 Jul 1996 04:00:00



I have 2 identiacl 1.6 gig drives.
One is partitioned and full of data, being used as our server.
The other is not being used, but containes one linux partition
with no usefull data.

I wanted to mirror hda onto hdb, so out of curiosity, I tried
        cp /dev/hda /dev/hdb

It seemed to copy the partition table and the data.

Did it really do that. If I were to swap the drives would things work?

Thanks

******************************** **************************************
*Rick Goldberg                 * *                                    *
*York University               * * "I never wanted to be average,     *
*President York U Computer Club* *   because when you are average you *
*Computer Science Dept.        * *   are just as far from the top as  *
*Toronto, Canada               * *   you are from the bottom."        *

*http://yucc.yorku.ca/~rickg   * *                                    *
******************************** **************************************
        "If you don't invest very much, the defeat doesn't hurt,
                But winning isn't very exciting."

 
 
 

cp dev/hda dev/hdb

Post by Tom Reg » Sun, 21 Jul 1996 04:00:00


I don't think so.
  All you did was overwrite the file /dev/hdb with the file /dev/hda.
  So now the file /dev/hdb points to the device driver for drive a just
  as /dev/hda does. I don't think the copy physically did anything to
  drive b.

  Check the dev directory and look at the major and minor numbers for
  hda and hdb. they should be different. If they are the same then they
  are both "pointing" to the save physical drive. In your case drive a.

--

                                             Jobs For Handicapped Inc.
                                             *ia Beach, Va.
                                             (804) 499-9684

 
 
 

cp dev/hda dev/hdb

Post by Paul Civa » Sun, 21 Jul 1996 04:00:00




Quote:> I have 2 identiacl 1.6 gig drives.
> One is partitioned and full of data, being used as our server.
> The other is not being used, but containes one linux partition
> with no usefull data.
> I wanted to mirror hda onto hdb, so out of curiosity, I tried

If you want to copy one disk onto the other, and both disks are of
exactly the same geometry then you should be able to use dd, not sure
what parameters you might need though.

If they're not the same size you can use dump and restore, there's an
example in the SunOS man pages.

Quote:>    cp /dev/hda /dev/hdb
> It seemed to copy the partition table and the data.
> Did it really do that. If I were to swap the drives would things work?

I don't think that will work.

-Paul-

--


 
 
 

cp dev/hda dev/hdb

Post by Nkosi Baruti Tyehimb » Mon, 22 Jul 1996 04:00:00



> I have 2 identiacl 1.6 gig drives.
> One is partitioned and full of data, being used as our server.
> The other is not being used, but containes one linux partition
> with no usefull data.

> I wanted to mirror hda onto hdb, so out of curiosity, I tried
>         cp /dev/hda /dev/hdb

Try the following:

'dd bs=5120 if=/dev/hda of=/dev/hdb'

This will do an exact copy for you. If you want more information on the
parameters used check out the man pages.  But quickly, if=infile,
of=outfile, bs=block size, which should be a multiple of 512.  The
larger the block size the quicker the copying will be.

--

Truly Yours,
N'kosi Baruti Tyehimba

________________________________________________________________
There is no personal problem, no matter how great it might seem,
that can't be taken care of with enough high explosives.
________________________________________________________________

 
 
 

cp dev/hda dev/hdb

Post by RICK M GOLDBE » Fri, 26 Jul 1996 04:00:00



>I don't think so.
>  All you did was overwrite the file /dev/hdb with the file /dev/hda.
>  So now the file /dev/hdb points to the device driver for drive a just
>  as /dev/hda does. I don't think the copy physically did anything to
>  drive b.

I dobn't think it just copied the device drivers, because both drives
were being accessed durring the copy, and the copy took about an hour.

-Rick

 
 
 

cp dev/hda dev/hdb

Post by Thomas Aeb » Mon, 29 Jul 1996 04:00:00




> > I wanted to mirror hda onto hdb, so out of curiosity, I tried
> >         cp /dev/hda /dev/hdb

> Try the following:

> 'dd bs=5120 if=/dev/hda of=/dev/hdb'

... and don't forget that you will most probably get a corrupted copy if one
of the partitions on hda is mounted read-write!

Bye,
Tom
----------------------------------------------------------------------------
STAR TREK VIRUS: Invades your system in places where no virus has gone before.

 
 
 

1. LILO that does linux at /dev/hda and BEos at /dev/hdb

I want to get lilo booting a install of be for intel version 4 that I just
did at /dev/hdb1 (do not know be's descriptor, yet...).  I have suse 5.3 at
/dev/hda2, with lilo in the mbr.  If anyone has a sample lilo.conf that they
use, could you please send me an email with it or post it here?  Im using
boot diskettes now to boot be.  Its not bad but booting from lilo would be
much nicer.

--
Michael Perry

-------------------

2. netscape error?

3. Multi boot: Linux [/dev/hda] and NT [/dev/hdb]

4. Netscape and ftp

5. Removing /dev/hda, Linux on /dev/hdb, how?

6. Unix version "listening" to multiple subnets??? A fix???

7. Move my disk from /dev/hda to /dev/hdb

8. a really annoying feature of the config menu structure

9. How to move existing linux install from /dev/hda --> /dev/hdb?

10. fsck -A -V -a only checks /dev/hdb* (but not hda*, hdc*)

11. What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

12. /dev/dsp, /dev/audio, /dev/midi., /dev/sndsta

13. Moving Linux from /dev/hdc to /dev/hdb - possible?