Next | Prev | Up | Top | Contents | Index

Choosing the Log Type and Size

Each XFS filesystem has a log that contains filesystem journaling records. This log requires dedicated disk space. This disk space doesn't show up in listings from the df command, nor can you access it with a filename.

The location of the disk space depends on the type of log you choose. The two types of logs are:

External

When an XFS filesystem is created on an XLV logical volume and log records are put into a log subvolume, the log is called an external log. The log subvolume is one or more disk partitions dedicated to the log exclusively.

Internal

When an XFS filesystem is created on a disk partition or XLV logical volume, or when it is created on an XLV logical volume that doesn't have a log subvolume, log records are put into a dedicated portion of the disk partition (or data subvolume) that contains user files. This type of log is called an internal log.
The guidelines for choosing the log type are:

For more information about XLV and log subvolumes, see the section "XLV Logical Volumes" in Chapter 6.

The amount of disk space needed for the log is a function of how the filesystem is used. The amount of disk space required for log records is proportional to the transaction rate and the size of transactions on the filesystem, not the size of the filesystem. Larger block sizes result in larger transactions. Transactions from directory updates (for example, the mkdir and rmdir commands and the create() and unlink() system calls) cause more log data to be generated.

You must choose the amount of disk space to dedicate to the log (called the log size). The minimum log size is 512 blocks. The typical log size is 1000 blocks. For filesystems with very high transaction activity, a larger log size of 2000 blocks is recommended.

For external logs, the size of the log is the same as the size of the log subvolume. The log subvolume is one or more disk partitions. You may find that you need to repartition a disk to create a properly sized log subvolume (see the section "Disk Repartitioning" in this chapter). For external logs, the size of the log is set when you create the log subvolume with the xlv_make command.

For internal logs, the size of the log is specified when you create the filesystem with the mkfs command.

The log size is specified in bytes as described in the section "Choosing the Filesystem Block Size and Extent Size" in this chapter or as a multiple of the filesystem block size by using the suffix "b."


Next | Prev | Up | Top | Contents | Index