We help IT Professionals succeed at work.

SCO, SCO-unix (x86), 5.0, Compaq proliant 1600 w/ 9 GB

kevincent
kevincent asked
on
What is the best way to duplicate a 9GB to another for replacement of the SCO unix disk in a single disk system?
Comment
Watch Question

IT Consultant and Infrastructure Architect
BRONZE EXPERT
Commented:
If you have two (physically) identical disk drives, you may use "dd" to copy
from one disk to another.
Something like this should do the trick:
  dd if=/dev/rhd00 of=/dev/rhd10 bs=8192k
Replace rhd00 and rhd10 with the correct names for your first (source) and
second (target) hard disk, respectively.
The naming scheme for SCO disk drives is
  [r]hdxy
where a leading "r" denotes the disk drive as a raw-device, x is the drive
number (starting from 0) and y the partition number (0 is the whole disk).


If you want to swap the original drive by a different (preferrably larger) one,
you will have to copy the filesystems one by one and also have to make
sure that the boot blocks get being transferred.
a) Partition you new (target) disk using SCO's fdisk
b) Create the filesystems as needed
c) Install the boot blocks on your new disk
      # instbb hd /dev/hd0a
d) To transfer the data, you may use tar or cpio.
    Mount the new disk's root filesystem under /mnt
      # mount /dev/hd11 /mnt
    and create the mount points for any other filesystems
      # mkdir /mnt/usr /mnt/export /mnt/whatever
    Now, mount all the other filesystems
      # mount /dev/hd14 /mnt/usr
           . . .
    Using tar, you will run a command like this:
      # cd /
      # tar cf - . | ( cd /mnt ; tar xvf - )

Author

Commented:
Thank You for your response.  I ran the dd command as follows:
dd if=/dev/dsk/0s0 of=/dev/dsk/1s0  and the process ran over 21 hours without completing.  I interupted it with a ctrl alt del and got a statement about the number of in / out records.  I then swapped the drive slots (moved id 1 to id 0 slot and booted the system sucessfully.  I would like to be able to do a disk to disk "backup" each Saturday using this method. Just wish the commnad would complete.  These drives are scsi 9.1Gb disks with barely 2Gb used space. And comments would be welcome.  
put the bs=8192  , or maybe higher.

the default block size is far too small for disk to disk.
Hanno P.S.IT Consultant and Infrastructure Architect
BRONZE EXPERT
Commented:
try to enlarge the size of the copy buffer to 128 KB)
  bs=131072k
You may try even larger block sizes.

Ideally, you would use the size of a whole track of your disk
Hanno P.S.IT Consultant and Infrastructure Architect
BRONZE EXPERT
Commented:
One warning notice: If you "dd" from a live system disk to another disk you may get
file system inconsistencies as data gets changed during copy !!
Make sure to run at least a "fsck" on the copied file systems on your target drive.
Chris BRetired

Commented:
Identical drives? Ghost will do it perfectly well.

Chris B

Author

Commented:
I tried ghost, the compaq array controller driver was not available on the ghost distribution cd for SCO. I have not been able to find it. And being a sco/unix newbee i don't know the commands to do simple stuff like copy and such.

Author

Commented:
Wgat syntax would i use to FSCK the drive that i copied?  Assume it is /dev/dsk/1s0.
Hanno P.S.IT Consultant and Infrastructure Architect
BRONZE EXPERT
Commented:
# fsck -y /dev/dsk/1s0     (but this is only one partition / file system)
If you have more than one file system youwill have to do it for all of them

Author

Commented:
I took the default 5 partitions on the disk and bielieve I only have two filesystems: /dev/root and /dev/boot

Author

Commented:
RE:
try to enlarge the size of the copy buffer to 128 KB)
  bs=131072k
You may try even larger block sizes.

Ideally, you would use the size of a whole track of your disk

How can I find the size of a whole track?  The geometry of the disk is as follows: Cyls=1106  hds=255  sectors=63
Hanno P.S.IT Consultant and Infrastructure Architect
BRONZE EXPERT
Commented:
calculate size in bytes: number-of-heads * sectors-per-track * size-of-sector

255 * 63 * 512

This looks like a LBA setting -- not the real physical characteristics of the drive, though.

Author

Commented:
so be it

Explore More ContentExplore courses, solutions, and other research materials related to this topic.