Make an exact copy of Disk

Make an exact copy of Disk

Post by Tim Anders » Fri, 07 Jun 2002 08:02:27



I have a system I'm developing that works fine on one system, but not
another.  The systems should be identical, but the one that's isn't
working has more patches on it than the one that is working.  What I
would like to do is to make an exact copy of the system disk of the
one that's working and copy it to a new disk.

Is there anything that can do this?  I'm thinking of piping a ufsdump
into a ufsrestore in single-user.  Would this work?

Any info would be greatly appreciated.

Tim

 
 
 

Make an exact copy of Disk

Post by jorgen.moqu.. » Fri, 07 Jun 2002 08:41:01



> I have a system I'm developing that works fine on one system, but not
> another.  The systems should be identical, but the one that's isn't
> working has more patches on it than the one that is working.  What I
> would like to do is to make an exact copy of the system disk of the
> one that's working and copy it to a new disk.

> Is there anything that can do this?  I'm thinking of piping a ufsdump
> into a ufsrestore in single-user.  Would this work?

> Any info would be greatly appreciated.

> Tim

yes, and dont forget to do "installboot" on a root/boot partition.
ex1.
  partition the new inserted disk equal to the root-disk using format.
  mkdir /root0
  mount /dev/dsk/"newdisk" /root0
  ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /root0 ;ufsrestore xf -)
  continue for any other partition on the system.
ex2.
  only one system disk in the system !
  assuming the "new" disk is t1
  dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 bs=8192

dd ex2. is not supported or recommended, if you never used it before !
neider does any of the ex. above verify the copied data !
/J?rgen

 
 
 

Make an exact copy of Disk

Post by Venkat » Fri, 07 Jun 2002 10:47:28


Sure ..
You can do the ufsdump and restore and installboot on the second disk.

I have an automated script. let me know if you need it.

Thanks

Quote:> I have a system I'm developing that works fine on one system, but not
> another.  The systems should be identical, but the one that's isn't
> working has more patches on it than the one that is working.  What I
> would like to do is to make an exact copy of the system disk of the
> one that's working and copy it to a new disk.

> Is there anything that can do this?  I'm thinking of piping a ufsdump
> into a ufsrestore in single-user.  Would this work?

> Any info would be greatly appreciated.

> Tim

 
 
 

Make an exact copy of Disk

Post by Dennis Clark » Fri, 07 Jun 2002 21:30:05




> > I have a system I'm developing that works fine on one system, but not
> > another.  The systems should be identical, but the one that's isn't
> > working has more patches on it than the one that is working.  What I
> > would like to do is to make an exact copy of the system disk of the
> > one that's working and copy it to a new disk.

> > Is there anything that can do this?  I'm thinking of piping a ufsdump
> > into a ufsrestore in single-user.  Would this work?

> > Any info would be greatly appreciated.

> > Tim

> yes, and dont forget to do "installboot" on a root/boot partition.
> ex1.
>   partition the new inserted disk equal to the root-disk using format.
>   mkdir /root0
>   mount /dev/dsk/"newdisk" /root0
>   ufsdump 0f - /dev/rdsk/c0t0d0s0 | (cd /root0 ;ufsrestore xf -)
>   continue for any other partition on the system.
> ex2.
>   only one system disk in the system !
>   assuming the "new" disk is t1
>   dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 bs=8192

> dd ex2. is not supported or recommended, if you never used it before !
> neider does any of the ex. above verify the copied data !
> /J?rgen

What about boot from cdrom and :

  prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s2
  dd if=/dev/dsk/c0t0d0s2 of=/dev/dsk/c0t1d0s2 bs=8192
  installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

Dennis

 
 
 

Make an exact copy of Disk

Post by Jerry Lesl » Fri, 07 Jun 2002 22:13:57


: I have a system I'm developing that works fine on one system, but not
: another.  The systems should be identical, but the one that's isn't
: working has more patches on it than the one that is working.  What I
: would like to do is to make an exact copy of the system disk of the
: one that's working and copy it to a new disk.
:
: Is there anything that can do this?  I'm thinking of piping a ufsdump
: into a ufsrestore in single-user.  Would this work?
:
: Any info would be greatly appreciated.
:
: Tim

If you're going to do this frequently, like a a QA lab might for testing
on multiple platforms, then this could be a solution:

     http://www.greystoneds.com/site/products/diskduplicators.html
     Greystone Data Systems, Inc --
     Leader in Hard Disk Drive Duplication and PCMCIA Cards.

If you have an OpenVMS system available, it can do it via BACKUP/PHYSICAL,
if there are two identical drives.

--Jerry Leslie   (my opinions are strictly my own)

 
 
 

Make an exact copy of Disk

Post by Shao W » Sat, 08 Jun 2002 07:43:46



> What about boot from cdrom and :

>   prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s2
>   dd if=/dev/dsk/c0t0d0s2 of=/dev/dsk/c0t1d0s2 bs=8192
>   installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

> Dennis

I think only the "dd" line would do the trick, and other
two aare not needed.  The "dd" command copies
the entire disk including the label.  Also, try to use
the raw disk instead:

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 bs=8192

If you don't feel like booting from CDROM, try
to shutdown the machine to single user mode, and
run the "dd" command there.  It's a good idea to
run fsck on the newly clone disk after dd.

Shao

 
 
 

Make an exact copy of Disk

Post by Thomas H Jones I » Tue, 25 Jun 2002 09:27:51





>>   prtvtoc /dev/rdsk/c0t0d0s0 | fmthard -s - /dev/rdsk/c0t1d0s2
>>   dd if=/dev/dsk/c0t0d0s2 of=/dev/dsk/c0t1d0s2 bs=8192
>>   installboot /usr/platform/`uname -m`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0

>I think only the "dd" line would do the trick, and other
>two aare not needed.  The "dd" command copies
>the entire disk including the label.  Also, try to use
>the raw disk instead:

>dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 bs=8192

yeah, that particular 'dd' invocation will obviate the `prtvtoc` and
`installboot` lines. However, using slice 2 also copies over the one
disks badblock table and geometry information. The former you REALLY
dont want to do, and the latter you would only want to do if both
drives are of the exact same geometry.

-tom
--

"You can only be -so- accurate with a claw-hammer."  --me

 
 
 

Make an exact copy of Disk

Post by Thomas H Jones I » Tue, 25 Jun 2002 09:53:40




Quote:>I have a system I'm developing that works fine on one system, but not
>another.  The systems should be identical, but the one that's isn't
>working has more patches on it than the one that is working.  What I
>would like to do is to make an exact copy of the system disk of the
>one that's working and copy it to a new disk.

>Is there anything that can do this?  I'm thinking of piping a ufsdump
>into a ufsrestore in single-user.  Would this work?

Well, do you have your root/boot disk mirrored via SDS or VxVM? Do you
have SDS installed (you will if this is a Solaris 8 or 9 system).

Either way, you could:
- slap a drive in
- attach it as a mirror of the root/boot disk
- wait till the sync operation completes
- detach the drive from the root/boot disk volume
- set the disk up for mounting off of slices

just one way of doing it.

-tom
--

"You can only be -so- accurate with a claw-hammer."  --me

 
 
 

1. copying / cloning a system disk, can't find an exact answer.

Hi all,

I'm trying to find a proper answer to the cloning thing. I have
read a some of the Q&A and the FAQ on this, but I can't seem to fine
a definitive solution.

Here is the situation. I have 2 43P with a 2gig drive with AIX 4.1.5
on it. What I would like to be able to do is clone the 2gig to the
9gig drive, remove the 2gig drive, change the SCSI ID of the new
drive to have the hdisk0 ID for the system. reboot and all is find
as if the system had originally the 9gig drive. All that without using
a tape drive.

The closest I found to doing something equivalant is:
1. Extend your rootvg with the new disk
    eg:  extendvg rootvg hdisk1
2.  Migrate everything from your old to your new disk:
    eg:   migratepv hdisk0 hdisk1
3.  Create a new blv
          bosboot -ad /dev/hdisk1
4.  Set your bootlist (if you're on a MCA machine, different if your're
on PCI)
          bootlist -m normal hdisk1 [and whatever else]
5.  You may need to delete the boot record from the old disk
          mkboot -c -d /dev/hdisk0 (if your hd5 was on the old disk)
6.  Some peole unset and set their primary dump device:
           sysdumpdev -p /dev/sysdumnull
           sysdumpdev -p /dev/hd6
7.   Get the old disks out of your root vg
           reducevg rootvg hdisk0
8.   Reboot.

Any suggestion on something better, an if step 4 will work on a 43P.
From the previous, it should make hdisk1 the solo boot disk.

Rick.

--
Richard Lefebvre, Sys-admin, CERCA, (514)369-5224            "Don't Panic"

http://www.CERCA.UMontreal.CA/~rick/

2. Mounting a digital camera

3. Copying disks using cat makes 2.4.20 very unresponsive

4. UPS, APC seriel interface

5. Making a bootable copy of a disk

6. Two variables in two dlls with the same name.

7. exact copy of drive?

8. WANTED: Info on X11 security

9. Setting up exact copy on 2nd machine

10. How to make exact copy of a harddrive?

11. How to make a exact copy of hard drive???????????????????

12. exact cd copy