For When You Can't Have The Real Thing
[ start | index | login ]
start > Sun > ODS > mirror

mirror

Created by dave. Last edited by dave, 12 years and 305 days ago. Viewed 2,402 times. #2
[diff] [history] [edit] [rdf]
labels
attachments
modify /etc/vfstab:
$ cat /etc/vfstab
#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/dsk/c0t0d0s3      -       -       swap    -       no      -
#/dev/dsk/c0t0d0s0      /dev/rdsk/c0t0d0s0      /       ufs     1       no      -
#/dev/dsk/c0t0d0s6      /dev/rdsk/c0t0d0s6      /usr    ufs     1       no      -
#/dev/dsk/c0t0d0s1      /dev/rdsk/c0t0d0s1      /var    ufs     1       no      -
#/dev/dsk/c0t0d0s5      /dev/rdsk/c0t0d0s5      /opt    ufs     2       yes     -
#/dev/dsk/c0t2d0s5      /dev/rdsk/c0t2d0s5      /opt/dorado     ufs     2       yes     -
#
/dev/md/dsk/d3  -       -       swap    -       no      -
/dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no      -
/dev/md/dsk/d6  /dev/md/rdsk/d6 /usr    ufs     1       no      -
/dev/md/dsk/d1  /dev/md/rdsk/d1 /var    ufs     1       no      -
/dev/md/dsk/d5  /dev/md/rdsk/d5 /opt    ufs     2       yes     -
/dev/md/dsk/d105        /dev/md/rdsk/d105       /opt/dorado     ufs     2       yes     -
swap    -       /tmp    tmpfs   -       yes     -

Create your metadevices and attach one arm to the mirrors:

metainit -f d11 1 1 c0t0d0s1
metainit d21 1 1 c0t1d0s1
metainit d1 -m d11

metainit -f d13 1 1 c0t0d0s3 metainit d23 1 1 c0t1d0s3 metainit d3 -m d13

metainit -f d15 1 1 c0t0d0s5 metainit d25 1 1 c0t1d0s5 metainit d5 -m d15

metainit -f d16 1 1 c0t0d0s6 metainit d26 1 1 c0t1d0s6 metainit d6 -m d16

metainit -f d115 1 1 c0t2d0s5 metainit d125 1 1 c0t3d0s5 metainit d105 -m d115

# # you MUST do the root file system LAST #

metainit -f d10 1 1 c0t0d0s0 metainit d20 1 1 c0t1d0s0 metainit d0 -m d10 metaroot d0 /usr/sbin/lockfs -fa # # ...because you MUST reboot IMMEDIATELY after doing the root FS # reboot

After reboot, attach the other arms of the mirrors:

metattach d0 d20
metattach d1 d21
metattach d3 d23
metattach d5 d25
metattach d6 d26
metattach d105 d125

Wait for the mirrors to sync, then verify with metastat.

no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt