The following sample md.tab file defines the metadevices for the diskset named dg-schost-1. The ordering of lines in the md.tab file is not important.
dg-schost-1/d0 -t dg-schost-1/d1 dg-schost-1/d4 dg-schost-1/d1 -m dg-schost-1/d2 dg-schost-1/d2 1 1 /dev/did/rdsk/d1s4 dg-schost-1/d3 1 1 /dev/did/rdsk/d55s4 dg-schost-1/d4 -m dg-schost-1/d5 dg-schost-1/d5 1 1 /dev/did/rdsk/d3s5 dg-schost-1/d6 1 1 /dev/did/rdsk/d57s5 |
The sample md.tab file is constructed as follows.
The following example uses Solstice DiskSuite terminology. For Solaris Volume Manager, a trans metadevice is instead called a transactional volume and a metadevice is instead called a volume. Otherwise, the following process is valid for both volume managers.
The first line defines 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 specified by their position after the -t flag.
dg-schost-1/d0 -t dg-schost-1/d1 dg-schost-1/d4 |
The second line defines the master device as a mirror of the metadevices. The -m in this definition signifies a mirror device, and one of the submirrors, d2, is associated with the mirror device, d1.
dg-schost-1/d1 -m dg-schost-1/d2 |
The fifth line similarly defines the log device, d4, as a mirror of metadevices.
dg-schost-1/d4 -m dg-schost-1/d5 |
The third line defines the first submirror of the master device, d2, as a one-way stripe.
dg-schost-1/d2 1 1 /dev/did/rdsk/d1s4 |
The fourth line defines the second submirror of the master device, d3.
dg-schost-1/d3 1 1 /dev/did/rdsk/d55s4 |
Finally, the log device submirrors, d5 and d6, are defined. In this example, simple metadevices for each submirror are created.
dg-schost-1/d5 1 1 /dev/did/rdsk/d3s5 dg-schost-1/d6 1 1 /dev/did/rdsk/d57s5 |