SUMMARY: Cloaning Disks

From: Cian O'Sullivan <Cian_at_logic.bm>
Date: Thu Feb 28 2002 - 15:07:37 EST
Thanks to the 9 people who replyed.

David Glass
eshafto@mac.com
Ozgur C. Demir
Ali Daniel
Chris Price
George R. G.
Daniel Zhuang
Chris Price,
Nate Campi.

Original is enclosed at the bottom.

There was a two step process involved, which unfortunatly I did not do as
clean as I should have, but the instructions below are taken from everyone in
pieces.

If you have two identical systems and you want to use the mirror of one as the
primary in another, you can do it two ways.

1st.  Break the mirror, and delete the referenced databases from the secondary
drive. (make sure you are carefull about the /etc/vfstab and /etc/system in
second drive.  Change ip/name in /etc/hosts, /etc/nodename, and
/etc/hostname.INT )

2nd.  Shut down system, move drive over to second system, boot -r, and away
you go.

3rd.  Install second drive in both systems, rebuild your metadb's, and kick
off your mirror.

-----
Beware as DiskSuite is a little finicky about the order, and method of doing
things, and removing databases in the wrong way can cause *cough* problems.

What I eventually did was a as follows,

1.  Broke the database mirror, with metadettach, and made proper changes to
allow system to boot up without mirror.

2.  Shut down the machine,  yanked mirrored drive, stuck in new blank drive.

3.  prtvtoc /dev/dsk/c1t0d0s0 | fmthard -s - /dev/rdsk/c1t1d0s0

(This copies the entire partition table from the boot drive to the secondary
drive.  Be carefull to ensure you have the correct drive values.  Note aswell
for the format hard command, it is the raw mount point, not the logical one.)

4.  Create a new filesystem on each partition you want on the new drive.

	newfs /dev/rdsk/c1t1d0s0
	newfs /dev/rdsk/c1t1d0s7

5.  Mount the root partition to /mnt or some other mount point

	mount /dev/dsk/c1t1d0s0 /mnt

6.  Copy the / partition over to the mounted secondary root you just created
and mounted in /mnt

	cd /
	find . -mount -print | cpio -pdmuV /mnt

The  -mount switch makes certain the find does not filter its way down some
mounted tree.

7.  Mount and copy over the other partitions as needed.

8.  Install the bootsector files on the new /mnt drive.

	installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s0

	Beware raw mount point again.

9.  Update the /etc/vfstab, the ip address for the new system (/etc/hosts,
/etc/hostanme.*, /etc/nodename)

10.  You will also needs to create a new /proc dir when you are finished, and
change groups and own to root:root

11.  When you move the disk across to a new machine or when you change its
SCSI ID slot you will need to do a reboot -- -r from the command line or boot
-r from the ok prompt.

12.  If you need to change the disk while in single user mode, just put in the
Solaris 8 Install disk into the cdrom, then type "boot cdrom -s" at the ok
prompt.  When you get to the #, mount /dev/dsk/c1t1d0s0 (or whatever the
slice) to /a   (Auto mount point for single user mode CD load)

cd into /a and make your changes.  You will probably need to set your terminal
to vt100 or something

13.  If you are using prngd with openssh, you will need to re-initializse the
/vaer/spool/prngd/pool file because it wont copy properly.

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

Its actually a handy little dupe item, and it was real real quick.   If anyone
has any additions to this please let me know.  Many thanks for all the help in
this item.

Regards

Cian

Cian O'Sullivan
Senior Systems Engineer
Logic Communications
Hamilton, BERMUDA
1-441-296-9601
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Feb 28 14:13:25 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:35 EST