Mirror solaris

Hi everyone.

I have a Sun Solaris box which is running on only one internal disk and obviously that is not a good thing, if the disk should fail. This is a pritty straight forward operation in AIX, where my experties are. I have never done this in solaris and would therefore appriciate any help on this matter.
Basicly I would like to know how this is done, from the point in time where I insert the disk in the machine and until the mirror is up and in sync. Anyone?

It is fully documented in the guide (for each version) on http://docs.sun.com including examples.

I just documented mine for Solaris 8. This is using Solstice Disk Suite. The drives are c1t0d0 and c1t1d0. Hope this helps.

Install Solstice disksuite from Solaris Software, disk 2 of 2.
#cd /cdrom/sol_8_202_sparc_2/Solaris_8/EA/products/DiskSuite_4.2.1

  1. run ./installer
  2. default install (place in /usr/sbin) and allow reboot
    Run commands below:
    # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
    (This causes the mirrored disk to have the exact format as the main root disk).
    Run format and check that BOTH internal disks match exactly. If not, this will fail.

BOTH internal drives need to match exactly.

# metadb -a -f c1t0d0s7
# metadb -a c1t1d0s7
# metainit -f d10 1 1 c1t0d0s0
d10: Concat/Stripe is setup
# metainit -f d20 1 1 c1t1d0s0
d20: Concat/Stripe is setup
# metainit d0 -m d10
d0: Mirror is setup
# metaroot d0
# metainit -f d11 1 1 c1t0d0s1
d11: Concat/Stripe is setup
# metainit -f d21 1 1 c1t1d0s1
d21: Concat/Stripe is setup
# metainit -f d13 1 1 c1t0d0s3
d13: Concat/Stripe is setup
# metainit -f d23 1 1 c1t1d0s3
d23: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
# metainit d3 -m d13
d3: Mirror is setup
# metainit -f d14 1 1 c1t0d0s4
d14: Concat/Stripe is setup
# metainit -f d24 1 1 c1t1d0s4
d24: Concat/Stripe is setup
# metainit d4 -m d14
d4: Mirror is setup
# metainit -f d15 1 1 c1t0d0s5
d15: Concat/Stripe is setup
# metainit -f d25 1 1 c1t1d0s5
d25: Concat/Stripe is setup
# metainit d5 -m d15
d5: Mirror is setup
# metainit -f d16 1 1 c1t0d0s6
d16: Concat/Stripe is setup
# metainit -f d26 1 1 c1t1d0s6
d26: Concat/Stripe is setup
# metainit d6 -m d16
d6: Mirror is setup

# echo �set md:mirrored_root_flag=1� >> /etc/system

edit /etc/vfstab. Use the /dev/md/dsk/d0 (or 1/3/4/5/6) instead of c1t0d0s0 (or 1/3/4/5/6)
reboot

run following commands:
# metattach d0 d20
d0: submirror d20 is attached
# metattach d1 d21
d1: submirror d21 is attached
# metattach d3 d23
d3: submirror d23 is attached
# metattach d4 d24
d4: submirror d24 is attached
# metattach d5 d25
d5: submirror d25 is attached
# metattach d6 d26
d6: submirror d25 is attached

Check progress of mirror sync. The mirroring takes 2-3 hours.
# metastat|grep -i progress

While waiting, run metastat -p | tee /etc/lvm/md.tab (captures DiskSuite config)

Then run # dumpadm -d /dev/md/dsk/d1

Ok I am actually trying to figure out how to setup raid mirroring now and ran across this thread. Hoping I can get some help as I am pretty new to solaris

My first disks are as follows
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
/pci@1f,4000/scsi@3/sd@0,0
1. c0t1d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
/pci@1f,4000/scsi@3/sd@1,0

I have the first disk partitioned as follows...

/dev/dsk/c0t0d0s0 7060665 4120071 2869988 59% /
/dev/dsk/c0t0d0s4 483119 65117 369691 15% /var
/dev/dsk/c0t0d0s1 8774965 46245 8640971 1% /opt
/dev/dsk/c0t0d0s3 1052243 1081 988028 1% /export/home

Ok so whats next. Can someone walk me through how to set the 2nd disk up as a mirror of the first. SVM confuses the heck out of me.. Thanks