Creating DiskSuite transaction logging metadevices
Solstice DiskSuite provides the capability to do file system logging for UFS file systems. Logging enables a quicker and cleaner startup of disk partitions following a crash or irregular shutdown. Changes made to the filesystem are kept in a log which is then reapplied to the filesystem during a disk checking procedure. Using logging devices helps to ensure both data integrity as well as quicker startup times.
SDS logging devices are known as metatrans devices. A metatrans device is identical to any other kind of metadevice. In order to configure the device it is assumed that there is a free slice on each disk. Logging devices should be approximately 1MB in size for each 100MB of file system space that will be logged. Creating logging devices greater than 64MB, however, is usually a waste of disk space.
Using our previous example setup, lets assume that slice 3 of each disk is not being used for a metadb. Again, creating the metatrans mirror is identical to creating any other kind of mirror.
# metainit d13 1 1 c0t0d0s3 # metainit d23 1 1 c0t1d0s3 # metainit d3 -m d13 # metattach d3 d23
Remember, it is necessary to reboot after creating the individual submirrors and before attaching them using metaattach.
Next, we will actually configure our partitions to utilize the new logging devices. In this example we are going to add transaction logging to our /export and /var file systems.
# metainit -f d64 -t d4 d3 # metainit -f d67 -t d7 d3
Warning: According to the DiskSuite documentation, the root (/) file system cannot utilize metatrans devices.
In addition, any 'system' file system, such as /usr, /var, etc. must have logging disabled before any kind of Solaris upgrade or installation.
Finally, we must udpate /etc/vfstab to point to the new meta devices for /var and /export, as in the following example:
/dev/md/dsk/d64 /dev/md/rdsk/d64 /var ufs 1 yes - /dev/md/dsk/d67 /dev/md/rdsk/d67 /export ufs 1 yes -
After the vfstab file is updated, it is necessary to reboot the system in order to begin using the new devices.