DiskSuite: Mirror the rest of the slices

Step 5:

edit /etc/opt/SUNWmd/md.tab and add the following ( or whatever you want )

# swap mirror
d11 1 1 /dev/dsk/c0t3d0s3
d1 -m d11
d21 1 1 /dev/dsk/c0t1d0s3

# usr mirror
d12 1 1 /dev/dsk/c0t3d0s6
d2 -m d12
d22 1 1 /dev/dsk/c0t1d0s6

# var mirror
d13 1 1 /dev/dsk/c0t3d0s1
d3 -m d13
d23 1 1 /dev/dsk/c0t1d0s1

# opt mirror
d15 1 1 /dev/dsk/c0t3d0s5
d5 -m d15
d25 1 1 /dev/dsk/c0t1d0s5

and then init all that like so …

# metainit d21
concat/stripe setup

# metainit -f d11
concat/stripe setup

# metainit d1
mirror setup

see a pattern here? Always init the inactive slice first. Then the
active slice. Then the actual mirror device. Ensure that the mirror
device ( like d1 ) has the ACTIVE slice attached. If you do it the
other way ( any other way) then plan for a disaster! You would end up
mirroring a blank slice with an active slice … not pretty.

Edit your /etc/vfstab … ensure that the new metadbs are being mounted and
fsck’ed …

# 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/md/dsk/d1 – – swap – no –
/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no –
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 no –
/dev/md/dsk/d3 /dev/md/rdsk/d3 /var ufs 1 no –
/dev/md/dsk/d5 /dev/md/rdsk/d5 /opt ufs 2 yes –
swap – /tmp tmpfs – yes –

If you’re wondering what happened to d4 … that’s another topic ( ufs
logging )

Reboot and you will have a system that is kinda mirrored. You now have
to attach the second submirror device to all those one way mirrors.

metattach d0 d20
metattach d1 d21
metattach d2 d22

And you will hear a lot of drive thrashing.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.