Solaris Tips
If you have some experience with Solaris on Sun hardware, you already know that almost all machines lack hardware RAID. Instead, you use Solstice DiskSuite, renamed in Solaris 9 to Sun Volume Manager.
Solstice DiskSuite (SDS for sort) saves its configuration in the State Replica Database, mantained through the use of metadb(1M), which gives it its knickname, in the disks. The usual way to install a Solaris server with two disks is to layout the filesystems in the first disk and, after install, convert those filesystems to mirrored metadevices. And, usually, you have to dedicate a small slice for the State Replica Database
Now I will explain how to avoid this dedicated slice
SDS allows to put the metadb in any slice in any disk, provided this slice is not already mounted, assigned to a metadevice or open for other purpose. Usually, if you have just installed your server and used the whole disk for the swap slice and filesystems, your disk has no slices that in that state.
The trick is that you can put the State Replica Database in the beginning of a slice and use that slice, the remaining of it in fact, to create a metadevice.
Well, if you have read the page title, you surely already know what I am going to explain now.
I assume your system disk is c0t0d0 and it will be mirrored in c0t1d0.
# swap -d /dev/dsk/c0t0d0s1
# metadb -a -f -c 2 c0t0d0s1 # metadb -a -c 2 c0t1d0s1
# metainit d11 1 1 c0t0d0s1 d11: Concat/Stripe is setup # metainit d12 1 1 c0t1d0s1 d12: Concat/Stripe is setup
# metainit d10 -m d11 d10: Mirror is setup # metattach d10 d12 d10: Submirror d12 is attached
# swap -a /dev/md/dsk/d10
That is it. Quick, simple and harmless.
Do not forget to change /etc/vfstab!