IBM Support

JFS2 Filesystem NOLOG Feature

Question & Answer


Question

Is it possible to mount a JFS2 filesystem without using a filesystem log device?

Answer

BACKGROUND

In AIX JFS (Journaled Filesystem) and JFS2 (Enhanced Journaled Filesystem) a log device or journal is used to allow faster filesystem recovery in case of a crash. The log can be an external logical volume or for JFS2 can be an inline log built into the tail end of the filesystem itself.

JFS and JFS2 record all filesystem transactions that would change filesystem metadata in these log devices. Then in case of a system crash or other potentially damaging event, AIX will search through the log and recover any changes that were not written to the filesystem. This can speed up repair of the filesystem as well as recovering data that may otherwise have been lost.

Journaling does incur a small performance penalty, as every transaction sent to the filesystem also triggers a log event to be written to the log device. In some cases customers have asked for the use of JFS2 without a log device for specific situations, which would give a performance boost to filesystem writes. However, metadata integrity is not insured due to not having the safety net of the log device. If a crash or other damage occurs the filesystem may have to be recreated or restored.

THE NOLOG FEATURE

In AIX 6.1 a NOLOG feature was added to the JFS2 filesystem to allow users to mount without using the JFS2 log device. This feature is intended for two uses:

1. Scratch or temporary filesystems. If the data in a filesystem is either not important or easily reproduced from some other means, then the JFS2 filesystem could be mounted without a log.

2. Filesystems that are being restored. If a complete restore is necessary of a filesystem, or data is being moved from one host to another via a data restore, the target filesystem could be mounted with no JFS2 log in order to speed up the restore process. As the data is already backed up, any filesystem integrity problems that could occur after this would not mean the data is lost, only that it has to be restored again.

After the restore is completed the filesystem should be unmounted and remounted again using a proper log device.

To mount a JFS2 filesystem with no log, use:
# mount -o log=NULL /mountpoint

A filesystem mounted in this way will show the log device = 0 from dumpfs:
log device      0x

And the mount command will show log=NULL:


# mount | grep /mountpoint
    /dev/fslv00     /mountpoint         jfs2   Jan 17 11:12 w,log=NULL


As this is not permanently set in the filesystem attributes, the next time it is mounted it will use the log defined for it. If it is unmounted it can be easily mounted using the original log device:
# umount /mountpoint
# mount /mountpoint

[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"File management","Platform":[{"code":"PF002","label":"AIX"}],"Version":"6.1;7.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
17 June 2018

UID

isg3T1012643