Sun Cluster 2.2 Software Installation Guide

Sample md.tab File

The ordering of lines in the md.tab file is not important, but construct your file in the "top down" fashion described below. The following sample md.tab file defines the metadevices for the diskset named green. The # character can be used to annotate the file. In this example, the logical host name is also green.


# administrative file system for logical host mounted under /green
green/d0 -t green/d1 green/d4
	green/d1 -m green/d2 green/d3
	    green/d2 1 1 /dev/did/rdsk/d1s4
	    green/d3 1 1 /dev/did/rdsk/d2s4
	green/d4 -m green/d5 green/d6
	    green/d5 1 1 /dev/did/rdsk/d3s5
	    green/d6 1 1 /dev/did/rdsk/d4s5

# /green/web
green/d10 -t green/d11 green/d14
	green/d11 -m green/d12 green/d13
	    green/d12 1 1 /dev/did/rdsk/d1s0
	    green/d13 1 1 /dev/did/rdsk/d2s0
	green/d14 -m green/d15 green/d16
	    green/d15 1 1 /dev/did/rdsk/d3s6
	    green/d16 1 1 /dev/did/rdsk/d4s6

#/green/home to be NFS-shared
green/d20 -t green/d21 green/d24
	green/d21 -m green/d22 green/d23
	    green/d22 1 1 /dev/did/rdsk/d3s0
	    green/d23 1 1 /dev/did/rdsk/d4s0
	green/d24 -m green/d25 green/d26
	    green/d25 1 1 /dev/did/rdsk/d1s6
	    green/d26 1 1 /dev/did/rdsk/d2s6

The first line defines the administrative file system as the trans metadevice d0 to consist of a master (UFS) metadevice d1 and a log device d4. The -t signifies this is a trans metadevice; the master and log devices are implied by their position after the -t flag.

The second line defines the master device as a mirror of the metadevices. The -m in this definition signifies a mirror device.


green/d1 -m green/d2 green/d3

The fifth line similarly defines the log device, d4, as a mirror of metadevices.


green/d4 -m green/d5 green/d6

The third line defines the first submirror of the master device as a one-way stripe.


green/d2 1 1 /dev/did/rdsk/d1s4

The next line defines the other master submirror.


green/d3 1 1 /dev/did/rdsk/d2s4

Finally, the log device submirrors are defined. In this example, simple metadevices for each submirror are created.


green/d5 1 1 /dev/did/rdsk/d3s5
green/d6 1 1 /dev/did/rdsk/d4s5

Similarly, mirrors are created for two other applications: d10 will contain a Web server and files, and d20 will contain an NFS-shared file system.

If you have existing data on the disks that will be used for the submirrors, you must back up the data before metadevice setup and restore it onto the mirror.

How to Initialize the md.tab File

This procedure assumes that you have ownership of the diskset on the node on which you will execute the metainit(1M) command. It also assumed that you have configured identical md.tab files on each node in the cluster. With Solstice DiskSuite 4.2, these files must be located in the /etc/opt/SUNWmd directory. With Solstice DiskSuite 4.2.1, the files must be in /etc/lvm.

  1. As root, initialize the md.tab file by running the metainit(1M) command.

    1. Take control of the diskset:


      phys-hahost1# metaset -s hahost1 -t
      

    2. Initialize the md.tab file. The -a option activates all metadevices defined in the md.tab file. For example, this command initializes the md.tab file for diskset hahost1.


      phys-hahost1# metainit -s hahost1 -a
      

    3. Repeat this for each diskset in the cluster.

      If necessary, run the metainit(1M) command from another node that has connectivity to the disks. This is required for clustered pair and ring topologies, where the disks are not accessible by all nodes.

  2. Use the metastat(1M) command to check the status of the metadevices.


    phys-hahost1# metastat -s hahost1