Topics: AIX, PowerHA / HACMP, System Admin
Mountguard
IBM has implemented a new feature implemented for JFS2 filesystems to prevent simultaneous mounting within PowerHA clusters.
While 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.
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.
To turn on Mount Guard on a filesystem you can permanently enable it via /usr/sbin/chfs:
The same option is used with crfs when creating a filesystem.# chfs -a mountguard=yes /mountpoint /mountpoint is now guarded against concurrent mounts.
To turn off mount guard:
To determine the mount guard state of a filesystem:# chfs -a mountguard=no /mountpoint /mountpoint is no longer guarded against concurrent mounts.
The /usr/sbin/mount command will not show the mount guard state.# lsfs -q /mountpoint Name Nodename Mount Pt VFS Size Options Auto Accounting /dev/fslv -- /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)
When a filesystem is protected against concurrent mounting, and a second mount attempt is made you will see this error:
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 /mountpoint mount: /dev/fslv on /mountpoint: Cannot mount guarded filesystem. The filesystem is potentially mounted on another node
Reference: http://www-01.ibm.com/support/docview.wss?uid=isg3T1018853# mount -o noguard /mountpoint mount: /dev/fslv on /mountpoint: Mount guard override for filesystem. The filesystem is potentially mounted on another node.
If you found this useful, here's more on the same topic(s) in our blog:
- Using NFS
- Generating random passwords
- IP alias
- Finding files with no defined user or group
- Using the image_data resource to restore a mksysb without preserving mirrors using NIM
Interested in learning more?