GPFS recovery logs

GPFS™ recovery logs are created at file system creation. Additional recovery logs are automatically created as needed. The file system manager assigns a recovery log to each node that accesses the file system.

Recovery logs are replicated only if default metadata replication is turned on (-m 2) or if explicitly enabled for logs (--log-replicas 2). You can check to see if log replication is enabled for a file system using the mmlsfs command and looking at the value of the -m and --log-replicas parameters. If both are set, the --log-replicas value takes precedence over the -m value for log replication.

GPFS maintains the atomicity of the on-disk structures of a file through a combination of rigid sequencing of operations and logging. The data structures maintained are the inode, indirect blocks, the allocation map, and the data blocks. Data blocks are written to disk before any control structure that references the data is written to disk. This ensures that the previous contents of a data block can never be seen in a new file. Allocation blocks, inodes, and indirect blocks are written and logged in such a way that there will never be a pointer to a block marked unallocated that is not recoverable from a log.

There are certain failure cases where blocks are marked allocated but not yet assigned to a file, and these can be recovered by running mmfsck in online or offline mode. Log recovery is run as part of:
  1. The recovery of a node failure affecting the objects that the failed node might have had locked.
  2. A mount after the file system has been unmounted everywhere.
Note: Space that is not used by metadata, quota files, and recovery logs is used for user data and directories and allocated from the block allocation map as needed.