This document discusses a new feature implemented for JFS2 filesystems to prevent simultaneous mounting.

Technote (FAQ)


Question

This document discusses a new feature implemented for JFS2 filesystems to prevent simultaneous mounting.

Answer

While AIX PowerHA can give concurrent access of volume groups to multiple systems, mounting a JFS2 filesystem on multiple nodes simultaneously will cause filesystem corruption.
These simultaneous mount events can also cause a system crash, when the system detects a conflict between data or metadata in the filesystem and the in-memory state of the filesystem.

The only exception to this is mounting the filesystem read-only, where files or directories can't be changed.


New Feature: Mount Guard

In AIX 7100-01 and 6100-07 a new feature called "Mount Guard" has been added to prevent simultaneous or concurrent mounts. If a filesystem appears to be mounted on another server, and the feature is enabled, AIX will prevent mounting on any other server.

Mount Guard is not enabled by default, but is configurable by the system administrator. The option is not allowed to be set on base OS filesystems such as /, /usr, /var etc.


Using Mount Guard

To turn on Mount Guard on a filesystem you can permanently enable it via /usr/sbin/chfs:

# chfs -a mountguard=yes /mountpoint
/mountpoint is now guarded against concurrent mounts.

The same option is used with crfs when creating a filesystem.

To turn off mount guard:

# chfs -a mountguard=no /mountpoint
/mountpoint is no longer guarded against concurrent mounts.

To determine the mount guard state of a filesystem:

# lsfs -q /mountpoint
Name            Nodename   Mount Pt               VFS   Size    Options    Auto Accounting
/dev/fslv34     --         /mountpoint            jfs2  4194304 rw         no   no
  (lv size: 4194304, fs size: 4194304, block size: 4096, sparse files: yes, inline log: no, inline log size: 0, EAformat: v1, Quota: no, DMAPI: no, VIX: yes, EFS: no, ISNAPSHOT: no, MAXEXT: 0, MountGuard: yes)

The /usr/sbin/mount command will not show the mount guard state.


Filesystem Mounting and Mount Guard

When a filesystem is protected against concurrent mounting, and a second mount attempt is made you will see this error:

# mount /mountpoint
mount: /dev/fslv34 on /mountpoint:
Cannot mount guarded filesystem.
The filesystem is potentially mounted on another node

After a system crash the filesystem may still have mount flags enabled and refuse to be mounted. In this case the guard state can be temporarily overridden by the "noguard" option to the mount command:

# mount -o noguard /mountpoint
mount: /dev/fslv34 on /mountpoint:
Mount guard override for filesystem.
The filesystem is potentially mounted on another node.

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
AIX check the HBA status
Viewed 16320 times since Tue, May 22, 2018
How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)
Viewed 11314 times since Sun, Jun 30, 2019
Unlock User ID in IBM AIX
Viewed 15041 times since Mon, May 28, 2018
AIX: How to set automatic logoff (only for terminals)
Viewed 2967 times since Mon, Jun 11, 2018
sysdumpdev Command
Viewed 1775 times since Mon, Jul 16, 2018
AIX 6.1: Extend VG 0516-1714 extendvg 0516-1254 extendvg
Viewed 4435 times since Fri, Jul 6, 2018
AIX oslevel version OS
Viewed 4819 times since Wed, Apr 17, 2019
Create volume groups on AIX - Normal Big Scalable
Viewed 6649 times since Thu, Feb 21, 2019
A tcpdump Tutorial and Primer with Examples
Viewed 4942 times since Sun, Jun 17, 2018
AIX perf how to
Viewed 18661 times since Tue, Aug 14, 2018