Mirroring the Entire Root Disk With Solstice Disk Suite
	  =======================================================

	###########################################################
	# Before executing this procedure, make sure you have run #
	# "format" to verify the disks (slices) you are mirroring #
	# have been partitioned identically.			  #
	# 			-----------			  #
	# Created by Bill Minick: 03/14/2001			  #
	# Updated by Bill Minick: 01/08/2009			  #
	###########################################################

	For the purposes of this document, let's assume the boot disk
	is c1t0d0s2 and the mirror disk is c1t1d0s2.
	    ^ ^   ^                         ^ ^   ^
	The arrows point to the meta device naming/numbering convention.
	i.e. device c1t0d0s5 = meta device d105
     	device c1t1d0s7 = meta device d117

	All commands reside in /usr/sbin. (ls -l /usr/sbin/meta*)

		MIRRORING THE ROOT (/) SLICE

	1.a)	*********************************************
		* Create a single Meta Database on slice 3  *
		* of Both Primary & Mirrored Disks          *
		*********************************************

		# metadb -a -f c1t0d0s3 c1t1d0s3

                               OR

	1.b)	**************************************************
		* Create Meta Database with replicas on slice 3  *
		* of Both Primary & Mirrored Disks               *
		**************************************************

		# metadb -a -f -c3 -l 8192 c1t0d0s3 c1t1d0s3

	2.)	*************************************
		* Setup Submirror Meta Boot Devices *
		*************************************
			       d0		Meta Boot Device
			       /\
			      /  \	
			     /    \
			    /      \
			  d100	  d110	 	Submirror Meta Boot Devices
			   |	    |
			   |	    |
			   |	    |
		       c1t0d0s0	 c1t1d0s0	Disk Devices

		# metainit -f d100 1 1 c1t0d0s0
		d100: Concat/Stripe is setup
		# metainit d110 1 1 c1t1d0s0
		d110: Concat/Stripe is setup
	
	3.)	***************************************
		* Setup Mirror Between the meta boot  *
		* device and the 1st meta boot device *
		***************************************

		# metainit d0 -m d100 
		d0: Mirror is setup

	4.)	*********************************************************
		* Setup the meta boot device.  Use the metaroot command *
		* to set up /etc/vfstab & /etc/system so the root (/)   *
		* filesystem can be booted on a meta root device	*
		*********************************************************
		# metaroot d0

	5.)	*****************************************
		* Prepare to reboot & reboot the system *
		*****************************************
		# lockfs -fa
		# sync;sync
		# reboot -- -r

	6.)	**************************************
		* Attach the meta boot device to the *
		* 2nd submirror meta boot device     *
		**************************************

		# metattach d0 d110
		d0: submirror d110 is attached



		MIRRORING THE REST OF THE ROOT DISK

	7.)	************************************
		* Setup 1st Submirror Meta Devices *
		************************************
			       d#		Meta Device
			       /\
			      /  \	
			     /    \
			    /      \
			  d10#	  d11#	 	Submirror Meta Devices
			   |	    |
			   |	    |
			   |	    |
		       c1t0d0s#	 c1t1d0s#	Disk Devices

		# = the slice number
		i.e.	1 = swap
			5 = /var
			6 = /export/home
			7 = /opt

		# metainit -f d101 1 1 c1t0d0s1
		d101: Concat/Stripe is setup
		# metainit -f d105 1 1 c1t0d0s5
		d105: Concat/Stripe is setup
		# metainit -f d106 1 1 c1t0d0s6
		d106: Concat/Stripe is setup
		# metainit -f d107 1 1 c1t0d0s7
		d107: Concat/Stripe is setup

	8.)	************************************
		* Setup 2nd Submirror Meta Devices *
		************************************

		# metainit d111 1 1 c1t1d0s1
		d111: Concat/Stripe is setup
		# metainit d115 1 1 c1t1d0s5
		d115: Concat/Stripe is setup
		# metainit d116 1 1 c1t1d0s6
		d116 Concat/Stripe is setup
		# metainit d117 1 1 c1t1d0s7
		d117: Concat/Stripe is setup

	9.)	******************************************
		* Setup Mirror Between 1st Submirror     *
		* Meta Device & the Primary Meta Devices *
		******************************************

		# metainit d1 -m d101
		d1: Mirror is setup
		# metainit d5 -m d105
		d5: Mirror is setup
		# metainit d6 -m d106
		d6: Mirror is setup
		# metainit d7 -m d107
		d7: Mirror is setup




	10.)	*************************************************************
		* Maka a backup copy of /etc/vfstab and edit /etc/vfstab.   *
		* so the system will boot up on the primary meta devices.   *
		* The /etc/vfstab should look something like the one below. *
		*************************************************************

		#device         device          mount           FS      fsck    mount   mount
		#to mount       to fsck         point           type    pass    at boot options
		#
		#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr          ufs     1       yes     -
		fd      -       /dev/fd fd      -       no      -
		/proc   -       /proc   proc    -       no      -
		/dev/md/dsk/d1  -       -       swap    -       no      -
		/dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no      -
		/dev/md/dsk/d5  /dev/md/rdsk/d5 /var    ufs     1       no      -
		/dev/md/dsk/d6  /dev/md/rdsk/d6 /export/home    ufs     2       yes     -
		/dev/md/dsk/d7  /dev/md/rdsk/d7 /opt    ufs     2       yes     -
		swap    -       /tmp    tmpfs   -       yes     -


	11.)	***********************************************************
		* Attach the meta devices to the secondary mirror devices *
		***********************************************************

		# metattach d1 d111
		d1: submirror d111 is attached
		# metattach d5 d115
		d5: submirror d115 is attached
		# metattach d6 d116
		d6: submirror d116 is attached
		# metattach d7 d117
		d7: submirror d117 is attached



	12.)	***************************************************************************
		* Perform a final reboot, making sure there are no errors when rebooting. *
		***************************************************************************

		# sync;sync
		# reboot -- -r



	13.)	**************************************************
		* Verify you are running on Primary Meta Devices *
		* by using the "df -k" & "swap -l" commands.     *
		**************************************************

		# df -k (or df -h)
		You should see something like this....

		Filesystem            kbytes    used   avail capacity  Mounted on
		/dev/md/dsk/d0       3096423 1619797 1414698    54%    /
		/proc                      0       0       0     0%    /proc
		fd                         0       0       0     0%    /dev/fd
		mnttab                     0       0       0     0%    /etc/mnttab
		/dev/md/dsk/d5       4129290   61859 4026139     2%    /var
		swap                 4993600      24 4993576     1%    /var/run
		swap                 4993592      16 4993576     1%    /tmp
		/dev/md/dsk/d7       10323610  310920 9496510     4%    /opt
		/dev/md/dsk/d6       6193583    3227 6128421     1%    /export/home

		# swap -l
		swapfile             dev  swaplo blocks   free
		/dev/md/dsk/d1      85,1      16 8389632 8389632




	14.)	Change the dump device to the swap metadevice.
		# /usr/sbin/dumpadm
		      Dump content: kernel pages
		       Dump device: /dev/dsk/c1t0d0s1 (swap)
		Savecore directory: /var/crash/cronus
		  Savecore enabled: yes

		# /usr/sbin/dumpadm -d  (i.e. /dev/md/dsk/d1)
		# /usr/sbin/dumpadm
		      Dump content: kernel pages
		       Dump device: /dev/md/dsk/d1 (swap)
		Savecore directory: /var/crash/cronus
		  Savecore enabled: yes


		****************************************************
		* Other DiskSuite ("meta") commands and files.	   *
		* Use the Man Pages to verify the options & syntax *
		****************************************************

		metadetach d0 d110 - detaches mirrors.
		metasync d0 - syncs submirrors to primary meta device.

		metaclear d100 \
		metaclear d111  > - removed metadevices.
		metaclear d107 /

		metastat ------ displays status of All meta devices.
		metastat d0 --- displays status of a specific meta devices.
		metastat -t --- displays status of All meta devices with timestamps.
		metastat -p --- displays active meta devices and hot spare pools in md.tab format.

		metatool & ---- runs the gui.

		metaoffline ---	places submirrors offline, prevent DiskSuite from reading
				and writing to the submirror that has been taken offline.
		metaonline ---- places submirrors online, resumes reading from and writing
				to the submirror.
		metareplace --- enables or replaces components (slices) within a submirror
				or RAID5 metadevice.
		metaparam ----- used to display or modify current parameters of metadevices.
		metahs -------- manages hot spares and hot spare pools.
		metaset -------	configures shared disksets.

		md.tab --------	metadisk utility file.
		md.cf --------- metadisk utility file.
		mddb.cf -------	metadevice state database replica locations.