Transactional Volumes Overview

A transactional volume is a volume that manages UFS logging. A transactional volume consists of two devices: a master device and a logging device.

A master device is a slice or volume that contains the file system that is being logged. Logging begins automatically when the transactional volume is mounted, provided the transactional volume has a logging device. The master device can contain an existing UFS file system (because creating a transactional volume does not alter the master device), or you can create a file system on the transactional volume later. Likewise, clearing a transactional volume leaves the UFS file system on the master device intact.

A logging device is a slice or volume that contains the log. A logging device can be shared by several transactional volumes. The log is a sequence of records, each of which describes a change to a file system.

A transactional volume has the same naming conventions as other volumes: /dev/md/dsk/d0, d1 ...,d2, and so forth. (For more information on volume naming conventions, see Volume Conventions .)

Transactional Volume Conventions

How do I use a transactional volume?

After a transactional volume is configured, it can be used just as if it were a physical slice. A transactional volume can be used as a block device (up to 2 Gbytes) or a raw device (up to 1 Tbyte). A UFS file system can be created on the transactional volume if the master device doesn't already have a file system.


Caution - A logging device or a master device can be a physical slice or a volume. For reliability and availability, however, use a RAID 1 (mirror) volume for logging devices. A device error on a physical logging device could cause data loss. You can also use RAID 1 (mirror) or RAID 5 volumes as master devices.


How much disk space does a logging device need?

A minimum of 1 Mbyte. (Larger logs permit more simultaneous file-system transactions.) The maximum log size is 1 Gbyte. 1 Mbyte worth of log per 1 Gbyte of file system is a recommended minimum. 1 Mbyte worth of log per 100 Mbyte of file system is a recommended "average." Unfortunately, there are no hard and fast rules. The best log size varies with an individual system's load and configuration. However, a log larger than 64 Mbytes will rarely be used. Fortunately, log sizes can be changed without too much work.

Which file systems should I log?

Generally, log your largest UFS file systems and the UFS file system whose data changes most often. It is probably not necessary to log small file systems with mostly read activity.

Which file systems should always have separate logs?

All logged file systems can shared the same log. For better performance, however, file systems with the heaviest loads should have separate logs.


Caution - You must disable logging for /usr, /var, /opt, or any other file systems used by the system during a Solaris upgrade or installation when installing or upgrading software on a Solaris system.


Where should I place logs?

Place logs on mirrors, unused slices, or slices that contain the state database replicas. A device error on a physical logging device (a slice) can cause data loss.

What if no slice is available for the logging device?

You can still configure a transactional volume. This may be useful if you plan to log exported file systems when you do not have a spare slice for the logging device. When a slice is available, you only need to attach it as a logging device. For instructions, seeSolaris Volume Manager Administration Guide.

Can a logging device be shared between trans metadevices?

Yes, a logging device can be shared between file systems, though heavily-used file systems should have their own logging device. The disadvantage to sharing a logging device is that certain errors require that all file systems sharing the logging device must be checked with the fsck(1M) command.