SUMMARY:Duplicate Solaris 2.1 Sys Disk

From: Lau, Victoria H (vlau@msmail2.hac.com)
Date: Tue Sep 24 1996 - 22:56:07 CDT


I'd posted this question about a month ago. My problem was resolved
almost immediately, from the good help of all of you. I was given
a couple of possible solutions. I accomplished the task with the
seemingly more complicated choice since I was trying not only to duplicate
but to combine two smaller disks into one 1GB system disk. However, the
simpler "dd" solution sounded so tempting that I wanted to test it too. I
finally got the chance to do this last night--hence the long-delayed summary.

My sincere thankyou goes to all of you, especially:

Birger A. Wathne
Daniel Lorenzini
Martin Huber
daryl@alliedpress.com
David Schiffrin
Rick Kelly
Daryl Clarkson

==========================================================================
Original question:

I was tasked to duplicate a Solaris 2.1 system disk running on an i386.
We do not have any tape drive on this system which is NOT networked to any
node (no Ethernet either). In order to preserve a copy of the existing
system, we plan to use ufsdump to duplicate all system disk partitions to
another disk, then write a boot block on the backup disk. We lost the
original Solaris 2.1 cdrom.

My problem is: I could not find "installboot" nor "format" commands
anywhere--I thought installboot should be in /usr/sbin/installboot.
Doing a "man" on these commands returned nothing.

If someone still has this OLD system, could you please advise me where
these files are?

When I run "uname -a" I get the following response:
  SunOS taft 5.1 Generic i86pc i386

I plan to use the following steps to duplicate the system disk:

- format/partition the backup disk (where is format?)
- ufsdump 0f - / | (cd /new_root; ufsrestore xf -)
- repeat above for all other file systems
- [/???]/installboot /usr/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0

==========================================================================
Solution 1:
==========

- Install the new disk as a slave drive

- reboot system with b -r

- Use fdisk to create a fixed disk partition table and install the master
  boot record (note: must use c0t1d0p0, not c0t1d0s0)
    # fdisk /dev/rdsk/c0t1d0p0

- Write a label to the new disk
    # fmthard -n sysdisk /dev/rdsk/c0t1d0s2

- Capture vtoc of the existing system disk, then use this file as a base to
  build the new disk vtoc with a 1GB size instead of 540MB (see log file for
  details)
    # prtvtoc /dev/rdsk/c0t0d0s2 > /drive0.vtoc
    # cp /drive0.vtoc /drive1.vtoc
    # vi /drive1.vtoc

- Create partition table per info specified in /drive1.vtoc
    # fmthard -s /drive1.vtoc /dev/rdsk/c0t1d0s2
    # prtvtoc /dev/rdsk/c0t1d0s2

- Use fstyp to check how the original file systems were newfs'ed; then create
  same for each file system
    # fstyp -v /dev/dsk/c0t0d0s0 | head -18
    [ repeat above for each file system ]

    # newfs /dev/rdsk/c0t1d0s0

    # foreach i (3 4 5 6 7)
    ? echo "y" | newfs -m 1 /dev/rdsk/c0t1d0s$i
    ? end

- Create mount points and mount all file systems from the new disk
    # mkdir new_root new_usr new_var new_tmp new_opt new_openwin new_accts

    # mount /dev/dsk/c0t1d0s7 /new_accts
    # mount /dev/dsk/c0t1d0s6 /new_usr
    # mount /dev/dsk/c0t1d0s5 /new_opt
    # mount /dev/dsk/c0t1d0s4 /new_openwin
    # mount /dev/dsk/c0t1d0s3 /new_var
    # mount /dev/dsk/c0t1d0s0 /new_root

- Dump all file systems to the new disk [I used ufsdump which generated
  some pipe problem errors (which is perfectly normal for disk-to-disk dumps
  since restore ends first, closing its end of the pipe, which upsets the
  other process) but the suggestions from this group were tar and cpio:
    cd /usr/openwin; find . -print -mount | dd bs=32k | cpio -pdmu
/new_openwin]

    # ufsdump 0f - /usr/openwin | (cd /new_openwin && ufsrestore xf -)
    [repeat this for all file systems]

==========================================================================
Solution 2:
==========

I was told to use dd to copy the whole disk to another disk which sounded
such a good idea that I must test it before I posted this summary.

This solution only works if you duplicate disks of the same size (and may
be from the same manufacturer).

- Install the new disk as a slave drive

- reboot system with b -r

- Use fdisk to create a fixed disk partition table and install the master
  boot record (note: must use c0t1d0p0, not c0t1d0s0)
    # fdisk /dev/rdsk/c0t1d0p0

- Write a label to the new disk
    # fmthard -n sysdisk /dev/rdsk/c0t1d0s2

- Capture vtoc of the existing system disk, then use this file as a base to
  build the new disk vtoc with a 1GB size instead of 540MB (see log file for
  details)
    # prtvtoc /dev/rdsk/c0t0d0s2 > /drive0.vtoc
    # cp /drive0.vtoc /drive1.vtoc
    # vi /drive1.vtoc

- Create partition table per info specified in /drive1.vtoc
    # fmthard -s /drive1.vtoc /dev/rdsk/c0t1d0s2
    # prtvtoc /dev/rdsk/c0t1d0s2

- Copy the entire disk (remember to use p0, not s0)
    # dd if=/dev/rdsk/c0t0d0p0 of=/dev/rdsk/c0t1d0p0 bs=128b

<<<<<< Attached TEXT file named "dd_entire_disk.log" follows >>>>>>
===============================================================================
Solaris 2.1 on x86 only.

Duplicate the entire system disk from one disk to another--the disk sizes of
both disks are identical.

After installing the new disk to be duplicated, be sure to boot with
"b -r" otherwise the devices in /dev/rdsk and /dev/dsk will not be generated.
===============================================================================

===============================================================================
We are duplicating the system disk with the following partitions onto the
slave disk.
===============================================================================

taft# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 15135 9305 4320 68% /
/dev/dsk/c0t0d0s6 85351 64016 20482 76% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 9591 5716 3780 60% /var
swap 54212 16 54196 0% /tmp
/dev/dsk/c0t0d0s5 208079 171224 34775 83% /opt
/dev/dsk/c0t0d0s4 88375 74408 13084 85% /usr/openwin
/dev/dsk/c0t0d0s7 529294 504744 19258 96% /accts/taft

===============================================================================
Check slave disk's target number.
===============================================================================

taft# dmesg

Sep 11 23:45
 
Solaris 2.1 for x86
Copyright (c) 1983-1993, Sun Microsystems, Inc.

root nexus = i86pc
isa0 at root
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
ISA-device: ata0
Disk0: <Vendor 'Gen-ATA ' Product 'QUANTUM FIREBALL'>
cmdk0 at ata0 target -65287600 lun 0
cmdk0 is /isa/ata@1f0,0/cmdk@0,0
Disk1: <Vendor 'Gen-ATA ' Product 'QUANTUM FIREBALL'>
cmdk1 at ata0 target -65188176 lun 0
cmdk1 is /isa/ata@1f0,0/cmdk@1,0
Unable to install/attach driver 'mcis'
Unable to install/attach driver 'aha'
Unable to install/attach driver 'eha'
Unable to install/attach driver 'dpt'
root on /isa/ata@1f0,0/cmdk@0,0:a fstype ufs
swap on swapfs fstype swapfs size 13344K
pcxx port:0x220 mem:0xd0000 8 ports PC/Xe V1.0.0
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Ethernet address = 0:0:c0:5c:67:7a
SMC WD8003/WD8013 driver: type=WD8013EB addr=00 00 c0 5c 67 7a
ISA-device: smc0
smc0 is /isa/smc@0,c0000
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
dump on /dev/dsk/c0t0d0s1 size 61476K
Sep 11 23:41:55 sendmail[168]: network daemon starting
ISA-device: asy0
asy0 is /isa/asy@3f8,0
ISA-device: asy1
asy1 is /isa/asy@2f8,0
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'

===============================================================================
Use fdisk to create a boot block to the slave disk. Since 3 partitions
were already created on this slave disk, delete all partitions, then
create one Solaris partition that uses the whole disk.

The disk we used was already prepartitioned. Otherwise, fdisk will default
to creating a 100% Solaris file system and allow the user to accept or
change it.
===============================================================================

taft# fdisk /dev/rdsk/c0t1d0p0
             Total disk size is 2110 cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===
          1 Other 1837170 2377350 540181 100
          2 Other 1386224 3340626 1954403 100
          3 Other 0 -1 0 0
SELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 3
Enter the number of the partition you want to delete
 (or enter 0 to exit ): 1
Do you want to delete partition 1? This will make all files and
programs in this partition inaccessible (type "y" or "n"). y
Partition 1 has been deleted. This was the active partition.
Total disk size is 2110 cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===
          1 Other 1386224 3340626 1954403 100
          2 Other 0 -1 0 0

SELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 3
Enter the number of the partition you want to delete
 (or enter 0 to exit ): 1
Do you want to delete partition 1? This will make all files and
programs in this partition inaccessible (type "y" or "n"). y
Partition 1 has been deleted. This was the active partition.
Total disk size is 2110 cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===
          1 Other 0 -1 0 0

SELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 3
Enter the number of the partition you want to delete
 (or enter 0 to exit ): 1
Do you want to delete partition 1? This will make all files and
programs in this partition inaccessible (type "y" or "n"). y
Partition 1 has been deleted. This was the active partition.
Total disk size is 2110 cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===

THERE ARE NO PARTITIONS CURRENTLY DEFINEDSELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 1
Indicate the type of partition you want to create
  (1=SOLARIS, 2=UNIX, 3=PCIXOS, 4=Other, 8=DOSBIG)
  (5=DOS12, 6=DOS16, 7=DOSEXT, 0=Exit) ?1
Indicate the percentage of the disk you want this partition
to use (or enter "c" to specify in cylinders). 100
Do you want this to become the Active partition? If so, it will be activated
each time you reset your computer or when you turn it on again.
Please type "y" or "n". y
Partition 1 is now the Active partition Total disk size is 2110
cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===
          1 Active SOLARIS 1 2109 2109 100

SELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 5

===============================================================================
Write a volume name to the new disk.
===============================================================================

taft# fmthard -n sysdisk /dev/rdsk/c0t1d0s2
fmthard: New volume table of contents now in place.

taft# prtvtoc /dev/rdsk/c0t1d0s2
* /dev/rdsk/c0t1d0s2 (volume "sysdisk") partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 2109 cylinders
* 2109 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271
       1 3 01 34272 122976 157247
       2 5 00 0 2125872 2125871
       3 7 00 157248 21168 178415
       4 4 00 178416 188496 366911
       5 6 00 366912 443520 810431
       6 4 00 810432 182448 992879
       7 8 00 992880 1126944 2119823
       9 9 01 2119824 5040 2124863

===============================================================================
Use the system disk partition table to create the same partition table on
the slave disk.
===============================================================================

taft# prtvtoc /dev/rdsk/c0t0d0s2 > /drive0.vtoc

taft# cat /drive0.vtoc
* /dev/rdsk/c0t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 2109 cylinders
* 2109 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271 /
       1 3 01 34272 122976 157247
       2 5 00 0 2125872 2125871
       3 7 00 157248 21168 178415 /var
       4 4 00 178416 188496 366911 /usr/openwin
       5 6 00 366912 443520 810431 /opt
       6 4 00 810432 182448 992879 /usr
       7 8 00 992880 1126944 2119823 /accts/taft
       9 9 01 2119824 5040 2124863

taft# fmthard -s /drive0.vtoc /dev/rdsk/c0t1d0s2
fmthard: New volume table of contents now in place.

taft# prtvtoc /dev/rdsk/c0t1d0s2
* /dev/rdsk/c0t1d0s2 (volume "sysdisk") partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 2109 cylinders
* 2109 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271
       1 3 01 34272 122976 157247
       2 5 00 0 2125872 2125871
       3 7 00 157248 21168 178415
       4 4 00 178416 188496 366911
       5 6 00 366912 443520 810431
       6 4 00 810432 182448 992879
       7 8 00 992880 1126944 2119823
       9 9 01 2119824 5040 2124863

===============================================================================
Use dd to copy the entire system disk to the slave disk. Be sure to use
p0 and not s0!
===============================================================================

taft# dd if=/dev/rdsk/c0t0d0p0 of=/dev/rdsk/c0t1d0p0 bs=128b

16616+1 records in
16616+1 records out

===============================================================================
Mount one of the slave partitions to check the copy.
===============================================================================

taft# taft# fsck /dev/rdsk/c0t1d0s0
** /dev/rdsk/c0t1d0s0
** Last Mounted on /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1198 files, 9313 used, 5822 free (14 frags, 726 blocks, 0.1% fragmentation)

taft# ls -Fla /mnt
total 4
drwxrwxr-x 2 root sys 512 Sep 28 1994 ./
drwxr-xr-x 24 root root 1024 Sep 11 23:57 ../

taft# mount /dev/dsk/c0t1d0s0 /mnt

taft# cd /mnt
taft# ls -Fla
total 1068
drwxr-xr-x 24 root root 1024 Sep 11 23:57 ./
drwxr-xr-x 24 root root 1024 Sep 11 23:57 ../
-rw------- 1 root other 196 Sep 11 23:57 .Xauthority
-rw-r--r-- 1 root other 438 Jan 22 1995 .Xdefaults
-rwxr-xr-x 1 root other 745 Aug 30 18:00 .openwin-init*
drwxr-xr-x 2 root other 512 Sep 28 1994 .wastebasket/
-r-------- 1 root other 44 Sep 11 23:57 .xnews.taft:0
drwxr-xr-x 7 root other 512 Jan 22 1995 accts/
lrwxrwxrwx 1 root other 9 Aug 30 01:51 bin -> ./usr/bin
drwxr-xr-x 2 root other 512 Sep 28 1994 cdrom/
drwxr-xr-x 2 root other 512 Jan 23 1995 cory/
drwxrwxr-x 16 root sys 2048 Sep 11 23:56 dev/
drwxrwxr-x 4 root sys 512 Sep 28 1994 devices/
-rw-r--r-- 1 root other 1019 Sep 11 23:52 drive0.vtoc
-rw-r--r-- 1 root other 1012 Aug 29 23:26 drive0.vtoc.new
-rw-r--r-- 1 root other 8005 Sep 11 23:54 duplicate_new_disk.log
drwxr-xr-x 25 root other 3072 Aug 30 22:07 etc/
drwxrwxr-x 2 root sys 512 Sep 28 1994 export/
drwxrwxr-x 2 root sys 512 Sep 28 1994 home/
-rw-r--r-- 1 root sys 276924 Apr 27 1993 kadb
drwxrwxrwx 9 root root 512 Sep 28 1994 kernel/
lrwxrwxrwx 1 root other 9 Aug 30 01:51 lib -> ./usr/lib
drwx------ 2 root root 8192 Aug 29 23:46 lost+found/
drwxrwxr-x 2 root sys 512 Sep 28 1994 mnt/
dr-xr-xr-x 2 root root 512 Sep 28 1994 net/
-rw-r--r-- 1 root other 12223 Aug 29 23:12 newdisk.log.1
-rw-r--r-- 1 root other 26521 Aug 30 00:37 newdisk.log.2
-rw-r--r-- 1 root other 12894 Aug 30 00:00 newdisk.log.3
-rw-r--r-- 1 root other 3529 Aug 30 01:11 newdisk.log.4
-rw-r--r-- 1 root other 3733 Aug 30 01:25 newdisk.log.5
-rw-r--r-- 1 root other 8302 Aug 30 01:31 newdisk.log.6
-rw-r--r-- 1 root other 11668 Aug 30 01:49 newdisk.log.7
-rw-r--r-- 1 root other 3574 Aug 30 20:12 newdisk.log.8
drwxrwxr-x 2 root root 512 Sep 28 1994 opt/
drwxr-xr-x 2 root sys 512 Sep 28 1994 proc/
drwxr-xr-x 2 root other 512 Oct 4 1994 root/
drwxrwxr-x 2 root sys 512 Sep 28 1994 sbin/
drwxr-xr-x 2 root bin 512 Sep 28 1994 shlib/
drwxrwxrwt 3 sys sys 512 Sep 28 1994 tmp/
dr-xr-xr-x 2 root root 512 Sep 28 1994 tmp_mnt/
-rw-r--r-- 1 root sys 109056 Apr 26 1993 ufsboot
drwxrwxr-x 2 root root 512 Sep 28 1994 usr/
drwxrwxr-x 2 root root 512 Sep 28 1994 var/

===============================================================================
Shutdown system to take down the new disk.
===============================================================================

taft# sync;sync;sync;shutdown -y -g0 -i0

<<<<<< Attached TEXT file named "duplicate_disk_x86.log" follows >>>>>>
===============================================================================
Combining x86 Solaris 2.1 system disk (sd0-540MB) and user disk (sd1-540MB)
onto one 1 GB disk, on a PC 386 system. Since we don't have the original
Solaris 2.1 boot cdrom and the boot floppy, we have to do on-line dumps from
one disk to the other.

After installing the new disk to be duplicated, be sure to boot with
"b -r" otherwise the devices in /dev/rdsk and /dev/dsk will not be generated.

There can be only two IDE drives on a PC, set at Master (C drive or target 0)
and Slave (D drive or target 1).

Since we can only copy from one disk to another and there can only be two
disks on line at the same time, we must combine the file systems on the
original two disks to output to one disk. The original disk structure is
as follows:

Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 15135 9037 4588 66% /
/dev/dsk/c0t0d0s6 85351 64016 12805 83% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 9591 5670 2971 66% /var
swap 53644 16 53628 0% /tmp
/dev/dsk/c0t0d0s5 222223 171224 28779 86% /opt
/dev/dsk/c0t0d0s4 88375 74371 5174 93% /usr/openwin
/dev/dsk/c0t1d0s2 499998 443940 6068 99% /accts/taft

The file system /accts/taft resides on target 2 disk, which occupies
slice 2 (entire disk) of a 540 MB disk. Our plan is to take off 15 MB
from /opt and add this to slice 7 (/dev/dsk/c0t0d0s7), the new home
for /accts/taft.
===============================================================================

===============================================================================
We commented out the user disk from /etc/vfstab, replaced the user disk with
a new 1 GB disk and rebooted the system.

Check dmesg to see what disks have been installed on the system.

Two disks were detected, cmdk@0,0 (c0t0d0) and cmdk@1,0 (c0t1d0). The
Fireball is our new 1 GB disk.

SMC--Ethernet.
===============================================================================

taft# alias dir "ls -Flag"

taft# dmesg
Aug 29 22:33
 
Solaris 2.1 for x86
Copyright (c) 1983-1993, Sun Microsystems, Inc.

root nexus = i86pc
isa0 at root
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
ISA-device: ata0
Disk0: <Vendor 'Gen-ATA ' Product 'QUANTUM LPS528A '>
cmdk0 at ata0 target -65287600 lun 0
cmdk0 is /isa/ata@1f0,0/cmdk@0,0
Disk1: <Vendor 'Gen-ATA ' Product 'QUANTUM FIREBALL'>
cmdk1 at ata0 target -65188176 lun 0
cmdk1 is /isa/ata@1f0,0/cmdk@1,0
Unable to install/attach driver 'mcis'
Unable to install/attach driver 'aha'
Unable to install/attach driver 'eha'
Unable to install/attach driver 'dpt'
root on /isa/ata@1f0,0/cmdk@0,0:a fstype ufs
swap on swapfs fstype swapfs size 13344K
pcxx port:0x220 mem:0xd0000 8 ports PC/Xe V1.0.0
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
Ethernet address = 0:0:c0:5c:67:7a
SMC WD8003/WD8013 driver: type=WD8013EB addr=00 00 c0 5c 67 7a
ISA-device: smc0
smc0 is /isa/smc@0,c0000
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'
dump on /dev/dsk/c0t0d0s1 size 61476K
Aug 29 22:32:19 sendmail[163]: network daemon starting
ISA-device: asy0
asy0 is /isa/asy@3f8,0
ISA-device: asy1
asy1 is /isa/asy@2f8,0
Unable to install/attach driver 'eisa'
Unable to install/attach driver 'mc'

taft# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 15135 9038 4587 66% /
/dev/dsk/c0t0d0s6 85351 64016 12805 83% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 9591 5672 2969 66% /var
swap 54196 16 54180 0% /tmp
/dev/dsk/c0t0d0s5 222223 171224 28779 86% /opt
/dev/dsk/c0t0d0s4 88375 74409 5136 94% /usr/openwin

===============================================================================
Use fdisk to create a fixed disk partition table and install the master boot
record that is put in the first sector of the fixed disk--the slave disk
(target 1). We must use c0t1d0p0 instead of c0t1d0s0 with the fdisk command.
===============================================================================

taft# fdisk /dev/rdsk/c0t1d0p0
The recommended default partitioning for your disk is:

  a 100% "SOLARIS System" partition.

To select this, please type "y". To partition your disk
differently, type "n" and the "fdisk" program will let you
select other partitions. y

===============================================================================
Repeat fdisk to check the total cylinders of the disk.
===============================================================================

taft# fdisk /dev/rdsk/c0t1d0p0
             Total disk size is 2110 cylinders
             Cylinder size is 1008 (512 byte) blocks
                                           Cylinders
      Partition Status Type Start End Length %
      ========= ====== ======== ===== === ====== ===
          1 Active SOLARIS 1 2109 2109 100

SELECT ONE OF THE FOLLOWING:

     1. Create a partition
     2. Change Active (Boot from) partition
     3. Delete a partition
     4. Exit (Update disk configuration and exit)
     5. Cancel (Exit without updating disk configuration)Enter Selection: 5

===============================================================================
Convert the total cylinder size to sectors. Remember to take the "Cylinders
End" number of 2109 as the base of the calculations since the first cylinder
(1008 blocks) is used by the bootblock.

The following calculations show that this new 1 GB disk has a total of
2125872 sectors.
===============================================================================

taft# bc
2109*1008
2125872

===============================================================================
Use fmthard with the -s option to create the desired VTOC table. We must use
the raw device and the entire disk (s2).

  -s datafile: The VTOC is populated according to the info in the datafile.

You may use the -i option if you just want to test it.

  -i: create VTOC table as desired but prints the info only to standard
       output instead of modifying the VTOC on the disk.
===============================================================================

===============================================================================
Save the output of the original target 0 system disk VTOC to a file and use it
as a template to create our new datafile. Edit the file with our new sizes.

Slice 0 does not start from cylinder 0, but cylinder 1 which is sector
number 1008.

Note that "slice 9" is reserved for alt (as specified in the /etc/vfstab).
This could be for the alternate boots for the disk.

Be sure to reserve 5040 sectors for this slice.
===============================================================================

taft# pwd
/

taft# prtvtoc /dev/rdsk/c0t0d0s2 > /drive0.vtoc

taft# cat drive0.vtoc
* /dev/rdsk/c0t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 1021 cylinders
* 1021 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271 /
       1 3 01 34272 122976 157247
       2 5 00 0 1029168 1029167
       3 7 00 157248 21168 178415 /var
       4 4 00 178416 188496 366911 /usr/openwin
       5 6 00 366912 473760 840671 /opt
       6 4 00 840672 182448 1023119 /usr
       9 9 01 1023120 5040 1028159

===============================================================================
Edit the VTOC file to create our own VTOC for the new disk.

The First Sector and the Sector Count numbers must be divisible by 1008.

- edit partition 2:

    change total Sector Count to 2125872 and Last Sector to 2125871

- edit partition 5:

    subtract 15 MB from /opt:
      15000000 / 512 bytes per sector = 29296.875000

    the total must be divisible by 1008:
      29296 / 1008 = 29.063492
      1008 * 30 = 30240

    subtract 30240 from /opt Sector Count total of 473760:
      473760 - 30240 = 443520

    subtract 30240 from /opt Last Sector of 840671:
      840671 - 30240 = 810431

- edit partition 6:

    adjust /usr's First Sector and Last Sector accordingly, keeping the
    same Sector Count

    subtract 30240 from /usr First Sector of 840672:
      840672 - 30240 = 810432

    check if this First Sector size is divisible by 1008:
      810432 / 1008 = 804.000000
  
    subtract 30240 from /usr Lastt Sector of 1023119:
      1023119 - 30240 = 992879

- add partition 7 for the user file system /accts/taft:

    use tag 8 (reserved code for 0x08 is for V_HOME--see man on fmthard)

    use Flag 00 (mountable slices use 0x00--see man on fmthard)

    the First Sector should be 992880 (add 1 to /usr's Last Sector)

    total Sector Count should be:
      [total Sector Count of partition 2] - [sum of all other partitions
totals]
           - 1008 (first cylinder)
      2125872 - (33264 + 122976 + 21168 + 188496 + 443520 + 182448 + 5040 +
1008) = 1127952

    deduct an additional 1008 (for disk label, volume name, indexes?)--we
    use the existing VTOC of target 0 as an example, subtracting the sum
    of all partition totals plus the first cyclinder from the disk total,
    and found a discrepancy of 1008 so we will subtract this from this
    last partition
      1127952 - 1008 = 1126944

    check if this Sector Count is divisible by 1008:
      1126944 / 1008 = 1118.000000

===============================================================================

taft# cp drive0.vtoc drive1.vtoc

taft# vi drive1.vtoc

taft# cat drive1.vtoc
* /dev/rdsk/c0t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 1021 cylinders
* 1021 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271 /
       1 3 01 34272 122976 157247
       2 5 00 0 2125872 2125871
       3 7 00 157248 21168 178415 /var
       4 4 00 178416 188496 366911 /usr/openwin
       5 6 00 366912 443520 810431 /opt
       6 4 00 810432 182448 992879 /usr
       7 8 00 992880 1126944 2119823 /acct
       9 9 01 2119824 5040 2124863

===============================================================================
Write a label to the disk.
===============================================================================

taft# fmthard -n sysdisk /dev/rdsk/c0t1d0s2

===============================================================================
Create a partition table per info specified in drive1.vtoc.
===============================================================================

taft# fmthard -s drive1.vtoc /dev/rdsk/c0t1d0s2
fmthard: New volume table of contents now in place.

taft# prtvtoc /dev/rdsk/c0t1d0s2
* /dev/rdsk/c0t1d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 16 tracks/cylinder
* 1008 sectors/cylinder
* 2109 cylinders
* 2109 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* Unallocated space:
* First Sector Last
* Sector Count Sector
* 0 1008 1007
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
       0 2 00 1008 33264 34271
       1 3 01 34272 122976 157247
       2 5 00 0 2125872 2125871
       3 7 00 157248 21168 178415
       4 4 00 178416 188496 366911
       5 6 00 366912 443520 810431
       6 4 00 810432 182448 992879
       7 8 00 992880 1126944 2119823
       9 9 01 2119824 5040 2124863

===============================================================================
Use fstyp to check how the original file systems were newfs'ed.

All original file systems were created with the standard newfs command with
no options. We'll create all file systems except / with a 1% minfree.
===============================================================================

taft# fstyp -v /dev/dsk/c0t0d0s0 | head -18
Usage: fstyp -v special
ufs
magic 11954 time Thu Aug 29 23:44:55 1996
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 2 size 16128 blocks 15135
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
csaddr 504 cssize 1024 shift 9 mask 0xfffffe00
ntrak 16 nsect 63 spc 1008 ncyl 32
cpg 16 bpg 1008 fpg 8064 ipg 3776
nindir 2048 inopb 64 nspf 2
nbfree 758 ndir 118 nifree 6362 nffree 14
cgrotor 0 fmod 0 ronly 0
file system state is valid, fsclean is 2
blocks available in each rotational position
Broken Pipe
Unknown_fstyp (no matches)

taft# fstyp -v /dev/dsk/c0t0d0s3 | head -18
Usage: fstyp -v special
ufs
magic 11954 time Thu Aug 29 23:39:40 1996
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 2 size 10584 blocks 9591
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
csaddr 504 cssize 1024 shift 9 mask 0xfffffe00
ntrak 16 nsect 63 spc 1008 ncyl 21
cpg 16 bpg 1008 fpg 8064 ipg 3776
nindir 2048 inopb 64 nspf 2
nbfree 465 ndir 318 nifree 6788 nffree 195
cgrotor 0 fmod 0 ronly 0
file system state is valid, fsclean is 2
blocks available in each rotational position
Broken Pipe
Unknown_fstyp (no matches)

taft# fstyp -v /dev/dsk/c0t0d0s4 | head -18
Usage: fstyp -v special
ufs
magic 11954 time Thu Aug 29 23:40:50 1996
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 12 size 94248 blocks 88375
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
csaddr 504 cssize 1024 shift 9 mask 0xfffffe00
ntrak 16 nsect 63 spc 1008 ncyl 187
cpg 16 bpg 1008 fpg 8064 ipg 3776
nindir 2048 inopb 64 nspf 2
nbfree 1578 ndir 184 nifree 40874 nffree 1342
cgrotor 0 fmod 0 ronly 0
file system state is valid, fsclean is 2
blocks available in each rotational position
Broken Pipe
Unknown_fstyp (no matches)

taft# fstyp -v /dev/dsk/c0t0d0s5 | head -18
Usage: fstyp -v special
ufs
magic 11954 time Thu Aug 29 23:15:45 1996
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 30 size 236880 blocks 222223
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
csaddr 504 cssize 1024 shift 9 mask 0xfffffe00
ntrak 16 nsect 63 spc 1008 ncyl 470
cpg 16 bpg 1008 fpg 8064 ipg 3776
nindir 2048 inopb 64 nspf 2
nbfree 6216 ndir 176 nifree 110414 nffree 1271
cgrotor 14 fmod 0 ronly 0
file system state is valid, fsclean is 2
blocks available in each rotational position
Broken Pipe
Unknown_fstyp (no matches)

taft# fstyp -v /dev/dsk/c0t0d0s6 | head -18
Usage: fstyp -v special
ufs
magic 11954 time Thu Aug 29 23:48:55 1996
sblkno 16 cblkno 24 iblkno 32 dblkno 504
sbsize 2048 cgsize 2048 cgoffset 32 cgmask 0xfffffff0
ncg 12 size 91224 blocks 85351
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
minfree 10% maxbpg 2048 optim time
maxcontig 7 rotdelay 0ms rps 60
csaddr 504 cssize 1024 shift 9 mask 0xfffffe00
ntrak 16 nsect 63 spc 1008 ncyl 181
cpg 16 bpg 1008 fpg 8064 ipg 3776
nindir 2048 inopb 64 nspf 2
nbfree 2609 ndir 325 nifree 37675 nffree 463
cgrotor 8 fmod 0 ronly 0
file system state is valid, fsclean is 2
blocks available in each rotational position
Broken Pipe
Unknown_fstyp (no matches)

===============================================================================
Create the new file systems.
===============================================================================

taft# newfs /dev/rdsk/c0t1d0s0
newfs: construct a new file system /dev/rdsk/c0t1d0s0: (y/n)? y
Warning: inode blocks/cyl group (71) >= data blocks (63) in last
    cylinder group. This implies 1008 sector(s) cannot be allocated.
/dev/rdsk/c0t1d0s0: 32256 sectors in 32 cylinders of 16 tracks, 63 sectors
        16.5MB in 2 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224,

taft# foreach i (3 4 5 6 7)
? echo "y" | newfs -m 1 /dev/rdsk/c0t1d0s$i
? end
setting optimization for space with minfree less than 10%
/dev/rdsk/c0t1d0s3: 21168 sectors in 21 cylinders of 16 tracks, 63 sectors
        10.8MB in 2 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224,
setting optimization for space with minfree less than 10%
/dev/rdsk/c0t1d0s4: 188496 sectors in 187 cylinders of 16 tracks, 63 sectors
        96.5MB in 12 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568,
 145760, 161952, 178144,
setting optimization for space with minfree less than 10%
/dev/rdsk/c0t1d0s5: 443520 sectors in 440 cylinders of 16 tracks, 63 sectors
        227.1MB in 28 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568,
 145760, 161952, 178144, 194336, 210528, 226720, 242912, 258080, 274272,
 290464, 306656, 322848, 339040, 355232, 371424, 387616, 403808, 420000,
 436192,
setting optimization for space with minfree less than 10%
/dev/rdsk/c0t1d0s6: 182448 sectors in 181 cylinders of 16 tracks, 63 sectors
        93.4MB in 12 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568,
 145760, 161952, 178144,
setting optimization for space with minfree less than 10%
/dev/rdsk/c0t1d0s7: 1126944 sectors in 1118 cylinders of 16 tracks, 63 sectors
        577.0MB in 70 cyl groups (16 c/g, 8.26MB/g, 3776 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 16224, 32416, 48608, 64800, 80992, 97184, 113376, 129568,
 145760, 161952, 178144, 194336, 210528, 226720, 242912, 258080, 274272,
 290464, 306656, 322848, 339040, 355232, 371424, 387616, 403808, 420000,
 436192, 452384, 468576, 484768, 500960, 516128, 532320, 548512, 564704,
 580896, 597088, 613280, 629472, 645664, 661856, 678048, 694240, 710432,
 726624, 742816, 759008, 774176, 790368, 806560, 822752, 838944, 855136,
 871328, 887520, 903712, 919904, 936096, 952288, 968480, 984672, 1000864,
 1017056, 1032224, 1048416, 1064608, 1080800, 1096992, 1113184,

===============================================================================
Create mount points and mount all the file systems from the new disk.
===============================================================================

taft# mkdir new_root new_usr new_var new_tmp new_opt new_openwin new_accts

taft# mount /dev/dsk/c0t1d0s7 /new_accts
taft# mount /dev/dsk/c0t1d0s6 /new_usr
taft# mount /dev/dsk/c0t1d0s5 /new_opt
taft# mount /dev/dsk/c0t1d0s4 /new_openwin
taft# mount /dev/dsk/c0t1d0s3 /new_var
taft# mount /dev/dsk/c0t1d0s0 /new_root

===============================================================================
Compare the new /opt and /accts/taft file systems with the existing ones
and make sure that the new ones have enough space to fit all the data.
===============================================================================

taft# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 15135 9088 4537 67% /
/dev/dsk/c0t0d0s6 85351 64016 12805 83% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 9591 5676 2965 66% /var
swap 53500 32 53468 0% /tmp
/dev/dsk/c0t0d0s5 222223 171224 28779 86% /opt
/dev/dsk/c0t0d0s4 88375 74409 5136 94% /usr/openwin
/dev/dsk/c0t1d0s7 529294 9 523993 0% /new_accts
/dev/dsk/c0t1d0s6 85351 9 84489 0% /new_usr
/dev/dsk/c0t1d0s5 208079 9 205990 0% /new_opt
/dev/dsk/c0t1d0s4 88375 9 87483 0% /new_openwin
/dev/dsk/c0t1d0s3 9591 9 9487 0% /new_var
/dev/dsk/c0t1d0s0 15135 9 13616 0% /new_root

===============================================================================
Dump all file systems to the new disk, with /var, /usr, and / as the last ones
to be dumped.
===============================================================================

===============================================================================
Dump /usr/openwin file system to /new_openwin.
===============================================================================

taft# cd /usr/openwin

taft# pwd
/usr/openwin

taft# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s4 88375 74409 5136 94% /usr/openwin

taft# dir
total 46
drwxrwxr-x 8 bin 512 Sep 28 1994 ./
drwxrwxr-x 24 sys 1024 Sep 28 1994 ../
drwxrwxr-x 2 bin 3584 Aug 29 21:52 bin/
drwxrwxr-x 2 bin 1024 Sep 28 1994 demo/
lrwxrwxrwx 1 root 11 Sep 28 1994 etc -> ./share/etc/
lrwxrwxrwx 1 root 15 Sep 28 1994 include -> ./share/include/
drwxrwxr-x 11 bin 2560 Sep 28 1994 lib/
drwx------ 2 root 8192 Sep 28 1994 lost+found/
lrwxrwxrwx 1 root 11 Sep 28 1994 man -> ./share/man/
drwxrwxr-x 2 bin 512 Sep 28 1994 modules/
drwxrwxr-x 9 bin 512 Sep 28 1994 share/

===============================================================================
The following ufsdump error:
  DUMP: error flushing command pipe: Error 0
  DUMP: Write error on standard output
  DUMP: Cannot recover
  DUMP: The ENTIRE dump is aborted.
is perfectly normal. The dump is fine. We usually get a pipe problem when
doing disk-to-disk dumps. This is either because the dump or the restore
ends first, closing its end of the pipe, upsetting the other process.
===============================================================================

taft# ufsdump 0f - /usr/openwin | (cd /new_openwin && ufsrestore xf -)
  DUMP: Date of this level 0 dump: Fri Aug 30 00:54:11 1996
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s4 (/usr/openwin) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 155282 blocks (75.82MB)
  DUMP: Writing 32 Kilobyte records
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
Warning: ./lost+found: File exists
  DUMP: 69.32% done, finished in 0:02
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
  DUMP: error flushing command pipe: Error 0
  DUMP: Write error on standard output
  DUMP: Cannot recover
  DUMP: The ENTIRE dump is aborted.

taft# df -k | grep openwin
/dev/dsk/c0t0d0s4 88375 74409 5136 94% /usr/openwin
/dev/dsk/c0t1d0s4 88375 74408 13084 85% /new_openwin

taft# taft# cd /new_openwin

taft# dir
total 46
drwxr-xr-x 8 root root 512 Aug 30 00:54 ./
drwxr-xr-x 31 root root 1024 Aug 30 00:01 ../
drwxrwxr-x 2 root bin 3584 Aug 29 21:52 bin/
drwxrwxr-x 2 root bin 1024 Sep 28 1994 demo/
lrwxrwxrwx 1 root other 11 Aug 30 00:54 etc -> ./share/etc/
lrwxrwxrwx 1 root other 15 Aug 30 00:54 include ->
./share/include/
drwxrwxr-x 11 root bin 2560 Sep 28 1994 lib/
drwx------ 2 root root 8192 Sep 28 1994 lost+found/
lrwxrwxrwx 1 root other 11 Aug 30 00:54 man -> ./share/man/
drwxrwxr-x 2 root bin 512 Sep 28 1994 modules/
drwxrwxr-x 9 root bin 512 Sep 28 1994 share/

===============================================================================
Dump /opt file system on /new_opt.
===============================================================================

taft# cd /opt

taft# pwd
/opt

taft# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s5 222223 171224 28779 86% /opt

taft# dir
total 36
drwxrwxr-x 11 root sys 512 Oct 4 1994 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:11 ../
drwxr-xr-x 5 bin bin 512 Sep 28 1994 IXIX11R5/
drwxrwxr-x 3 root sys 512 Sep 28 1994 SUNWits/
drwxrwxr-x 4 bin bin 512 Sep 28 1994 SUNWmfdoc/
drwxrwxr-x 6 bin bin 512 Sep 28 1994 SUNWmotif/
drwxrwxr-x 5 bin bin 512 Sep 28 1994 SUNWsdk/
drwxrwxr-x 11 root sys 512 Sep 28 1994 SUNWspro/
drwxr-xr-x 4 27010 root 512 Sep 28 1994 Solaris_2.1_ABxu/
drwx------ 2 root root 8192 Sep 28 1994 lost+found/
drwxr-xr-x 2 root other 512 Oct 4 1994 pcxx/

taft# ufsdump 0f - /opt | (cd /new_opt && ufsrestore xf -)
  DUMP: Date of this level 0 dump: Fri Aug 30 01:13:44 1996
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s5 (/opt) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 342006 blocks (167.00MB)
  DUMP: Writing 32 Kilobyte records
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
Warning: ./lost+found: File exists
  DUMP: 60.76% done, finished in 0:03
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n
  DUMP: Write error on standard output
  DUMP: Cannot recover
  DUMP: The ENTIRE dump is aborted.

taft# df -k | grep opt
/dev/dsk/c0t0d0s5 222223 171224 28779 86% /opt
/dev/dsk/c0t1d0s5 208079 171224 34775 83% /new_opt

taft# dir /new_opt
total 36
drwxr-xr-x 11 root root 512 Aug 30 01:14 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:14 ../
drwxr-xr-x 5 bin bin 512 Sep 28 1994 IXIX11R5/
drwxrwxr-x 3 root sys 512 Sep 28 1994 SUNWits/
drwxrwxr-x 4 bin bin 512 Sep 28 1994 SUNWmfdoc/
drwxrwxr-x 6 bin bin 512 Sep 28 1994 SUNWmotif/
drwxrwxr-x 5 bin bin 512 Sep 28 1994 SUNWsdk/
drwxrwxr-x 11 root sys 512 Sep 28 1994 SUNWspro/
drwxr-xr-x 4 27010 root 512 Sep 28 1994 Solaris_2.1_ABxu/
drwx------ 2 root root 8192 Aug 29 23:51 lost+found/
drwxr-xr-x 2 root other 512 Oct 4 1994 pcxx/

===============================================================================
Dump /var file system on /new_var.
===============================================================================

taft# cd /var

taft# pwd
/var

taft# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s3 9591 5676 2965 66% /var

taft# dir
total 50
drwxrwxr-x 18 root sys 512 Sep 28 1994 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:25 ../
drwxrwxr-x 6 root sys 512 Aug 24 04:05 adm/
drwxr-xr-x 2 root sys 512 Sep 28 1994 cron/
drwx------ 2 root root 8192 Sep 28 1994 lost+found/
drwxrwxr-x 3 lp lp 512 Sep 28 1994 lp/
drwxrwxrwt 3 root mail 512 Aug 29 03:16 mail/
drwxrwxrwx 2 bin bin 512 Sep 28 1994 news/
drwxr-xr-x 2 root sys 512 Sep 28 1994 nis/
drwxrwxr-x 2 root sys 512 May 3 1993 opt/
drwxrwxrwx 2 bin bin 512 Sep 28 1994 preserve/
drwxr-xr-x 7 root sys 512 Sep 28 1994 sadm/
drwxr-xr-x 3 bin bin 512 Sep 28 1994 saf/
drwxrwxr-x 9 root bin 512 May 3 1993 spool/
drwxrwxrwx 4 root root 512 Sep 28 1994 statmon/
drwxrwxrwt 3 sys sys 512 Aug 29 23:38 tmp/
drwxr-xr-x 8 uucp uucp 512 Sep 28 1994 uucp/
drwxrwxrwx 3 root root 512 Sep 28 1994 yp/

taft# ufsdump 0f - /var | (cd /new_var && ufsrestore xf -)
  DUMP: Date of this level 0 dump: Fri Aug 30 01:27:30 1996
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s3 (/var) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 12704 blocks (6.20MB)
  DUMP: Writing 32 Kilobyte records
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
Warning: ./lost+found: File exists
  DUMP: 12704 blocks (6.20MB) on 1 volume
  DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n

taft# df -k | grep var
/dev/dsk/c0t0d0s3 9591 5676 2965 66% /var
/dev/dsk/c0t1d0s3 9591 5676 3820 60% /new_var

taft# dir /new_var
total 50
drwxr-xr-x 18 root root 512 Aug 30 01:27 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:25 ../
drwxrwxr-x 6 root sys 512 Aug 24 04:05 adm/
drwxr-xr-x 2 root sys 512 Sep 28 1994 cron/
drwx------ 2 root root 8192 Aug 29 23:51 lost+found/
drwxrwxr-x 3 lp lp 512 Sep 28 1994 lp/
drwxrwxrwt 3 root mail 512 Aug 29 03:16 mail/
drwxrwxrwx 2 bin bin 512 Sep 28 1994 news/
drwxr-xr-x 2 root sys 512 Sep 28 1994 nis/
drwxrwxr-x 2 root sys 512 May 3 1993 opt/
drwxrwxrwx 2 bin bin 512 Sep 28 1994 preserve/
drwxr-xr-x 7 root sys 512 Sep 28 1994 sadm/
drwxr-xr-x 3 bin bin 512 Sep 28 1994 saf/
drwxrwxr-x 9 root bin 512 May 3 1993 spool/
drwxrwxrwx 4 root root 512 Sep 28 1994 statmon/
drwxrwxrwt 3 sys sys 512 Aug 29 23:38 tmp/
drwxr-xr-x 8 uucp uucp 512 Sep 28 1994 uucp/
drwxrwxrwx 3 root root 512 Sep 28 1994 yp/

===============================================================================
Dump /usr file system on /new_usr.
===============================================================================

taft# cd /usr

taft# pwd
/usr

taft# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s6 85351 64016 12805 83% /usr

taft# dir
total 116
drwxrwxr-x 24 root sys 1024 Sep 28 1994 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:25 ../
lrwxrwxrwx 1 root root 5 Sep 28 1994 5bin -> ./bin/
lrwxrwxrwx 1 root root 10 Sep 28 1994 adm -> ../var/adm/
drwx------ 8 root bin 512 Sep 28 1994 aset/
drwxrwxr-x 2 root bin 6656 Jan 21 1995 bin/
drwxr-xr-x 4 bin bin 512 Sep 28 1994 ccs/
drwxrwxr-x 3 root bin 512 Sep 28 1994 demo/
lrwxrwxrwx 1 root root 16 Sep 28 1994 dict ->
./share/lib/dict/
drwxrwxr-x 2 root bin 512 Sep 28 1994 games/
drwxrwxr-x 14 root bin 2560 Sep 28 1994 include/
drwxr-xr-x 6 root sys 512 Sep 28 1994 kernel/
drwxrwxr-x 2 bin bin 1024 Sep 28 1994 kvm/
drwxrwxr-x 22 root sys 4096 Sep 28 1994 lib/
drwx------ 2 root root 8192 Sep 28 1994 lost+found/
lrwxrwxrwx 1 root root 11 Sep 28 1994 mail -> ../var/mail/
lrwxrwxrwx 1 root root 11 Sep 28 1994 man -> ./share/man/
drwxrwxr-x 4 root sys 512 Sep 28 1994 net/
lrwxrwxrwx 1 root root 11 Sep 28 1994 news -> ../var/news/
lrwxrwxrwx 1 root root 10 Sep 28 1994 nserve -> ../etc/rfs/
drwxr-xr-x 5 bin bin 512 Sep 28 1994 oasys/
drwxrwxr-x 2 root bin 512 Sep 28 1994 old/
drwxrwxr-x 8 root bin 512 Sep 28 1994 openwin/
lrwxrwxrwx 1 root root 15 Sep 28 1994 preserve ->
../var/preserve/
lrwxrwxrwx 1 root root 15 Sep 28 1994 pub -> ./share/lib/pub/
drwxr-xr-x 5 bin bin 512 Sep 28 1994 sadm/
drwxrwxr-x 4 root bin 3584 Sep 28 1994 sbin/
drwxr-xr-x 5 root sys 512 Sep 28 1994 share/
drwxr-xr-x 4 root bin 512 Sep 28 1994 snadm/
lrwxrwxrwx 1 root root 12 Sep 28 1994 spool -> ../var/spool/
lrwxrwxrwx 1 root root 11 Sep 28 1994 src -> ./share/src/
lrwxrwxrwx 1 root root 10 Sep 28 1994 tmp -> ../var/tmp/
drwxrwxr-x 2 root bin 2048 Sep 28 1994 ucb/
drwxrwxr-x 4 root other 512 Sep 28 1994 ucbinclude/
drwxr-xr-x 2 bin bin 512 Sep 28 1994 ucblib/
drwxr-xr-x 7 bin bin 512 Sep 28 1994 vmsys/

taft# ufsdump 0f - /usr | (cd /new_usr && ufsrestore xf -)
  DUMP: Date of this level 0 dump: Fri Aug 30 01:33:11 1996
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s6 (/usr) to standard output
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 141590 blocks (69.14MB)
  DUMP: Writing 32 Kilobyte records
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
Warning: ./lost+found: File exists
  DUMP: 57.00% done, finished in 0:03
  DUMP: 90.45% done, finished in 0:01
  DUMP: 141590 blocks (69.14MB) on 1 volume
  DUMP: DUMP IS DONE
set owner/mode for '.'? [yn] n
Directories already exist, set modes anyway? [yn] n

taft# df -k | grep usr
/dev/dsk/c0t0d0s6 85351 64016 12805 83% /usr
/dev/dsk/c0t0d0s4 88375 74409 5136 94% /usr/openwin
/dev/dsk/c0t1d0s6 85351 64016 20482 76% /new_usr

taft# dir
total 116
drwxrwxr-x 24 root sys 1024 Sep 28 1994 ./
drwxr-xr-x 31 root root 1024 Aug 30 01:31 ../
lrwxrwxrwx 1 root root 5 Sep 28 1994 5bin -> ./bin/
lrwxrwxrwx 1 root root 10 Sep 28 1994 adm -> ../var/adm/
drwx------ 8 root bin 512 Sep 28 1994 aset/
drwxrwxr-x 2 root bin 6656 Jan 21 1995 bin/
drwxr-xr-x 4 bin bin 512 Sep 28 1994 ccs/
drwxrwxr-x 3 root bin 512 Sep 28 1994 demo/
lrwxrwxrwx 1 root root 16 Sep 28 1994 dict ->
./share/lib/dict/
drwxrwxr-x 2 root bin 512 Sep 28 1994 games/
drwxrwxr-x 14 root bin 2560 Sep 28 1994 include/
drwxr-xr-x 6 root sys 512 Sep 28 1994 kernel/
drwxrwxr-x 2 bin bin 1024 Sep 28 1994 kvm/
drwxrwxr-x 22 root sys 4096 Sep 28 1994 lib/
drwx------ 2 root root 8192 Sep 28 1994 lost+found/
lrwxrwxrwx 1 root root 11 Sep 28 1994 mail -> ../var/mail/
lrwxrwxrwx 1 root root 11 Sep 28 1994 man -> ./share/man/
drwxrwxr-x 4 root sys 512 Sep 28 1994 net/
lrwxrwxrwx 1 root root 11 Sep 28 1994 news -> ../var/news/
lrwxrwxrwx 1 root root 10 Sep 28 1994 nserve -> ../etc/rfs/
drwxr-xr-x 5 bin bin 512 Sep 28 1994 oasys/
drwxrwxr-x 2 root bin 512 Sep 28 1994 old/
drwxrwxr-x 8 root bin 512 Sep 28 1994 openwin/
lrwxrwxrwx 1 root root 15 Sep 28 1994 preserve ->
../var/preserve/
lrwxrwxrwx 1 root root 15 Sep 28 1994 pub -> ./share/lib/pub/
drwxr-xr-x 5 bin bin 512 Sep 28 1994 sadm/
drwxrwxr-x 4 root bin 3584 Sep 28 1994 sbin/
drwxr-xr-x 5 root sys 512 Sep 28 1994 share/
drwxr-xr-x 4 root bin 512 Sep 28 1994 snadm/
lrwxrwxrwx 1 root root 12 Sep 28 1994 spool -> ../var/spool/
lrwxrwxrwx 1 root root 11 Sep 28 1994 src -> ./share/src/
lrwxrwxrwx 1 root root 10 Sep 28 1994 tmp -> ../var/tmp/
drwxrwxr-x 2 root bin 2048 Sep 28 1994 ucb/
drwxrwxr-x 4 root other 512 Sep 28 1994 ucbinclude/
drwxr-xr-x 2 bin bin 512 Sep 28 1994 ucblib/
drwxr-xr-x 7 bin bin 512 Sep 28 1994 vmsys/

===============================================================================
Dump / file system on /new_root.
===============================================================================

taft# cd /

taft# ufsdump 0f - / | (cd /new_root && ufsrestore xf -)

===============================================================================
Edit /etc/vfstab and uncomment out the mount for /accts/taft.
===============================================================================

taft# vi /etc/vfstab

===============================================================================
Shut down the system. Replace the old system disk with the new 1 GB system
disk (change jumper from Slave to Master). Add the user disk as the Slave.
===============================================================================

===============================================================================
Dump the /accts/taft which resides on /dev/rdsk/c0t1d0s2 onto /new_accts.
===============================================================================

taft# ufsdump 0f - /dev/rdsk/c0t1d0s2 | (cd /new_accts && ufsrestore xf -)



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:10 CDT