Solaris Volume Manager Administration Guide

Example—Creating a Transactional Volume for a Logical Volume


# umount /home1
# metainit d64 -t d30 d12
d64: Trans is setup
(Edit the /etc/vfstab file so that the file system references 
the transactional volume)
# mount /home1

RAID 1 volume d30 contains a file system that is mounted on /home1. The mirror that will contain the log device is d12. First, the file system is unmounted. The metainit command with the -t option creates the transactional volume, d64.

Next, the line in the /etc/vfstab file that mounts the file system must be changed to reference the transactional volume. For example, the following line:


/dev/md/dsk/d30 /dev/md/rdsk/d30 /home1 ufs 2 yes -

should be changed to:


/dev/md/dsk/d64 /dev/md/rdsk/d64 /home1 ufs 2 yes -

Logging becomes effective for the file system when the file system is remounted.

On subsequent file system remounts or system reboots, instead of checking the file system, the fsck command displays a log message for the transactional volume:


# reboot
...
/dev/md/rdsk/d64: is logging

Note –

To avoid editing the /etc/vfstab file, you can use the metarename(1M) command to exchange the name of the original logical volume and the new transactional volume. For more information, see Renaming Volumes.