How do you bind mount a GFS2 file-system?
Environment
- Red Hat Enterprise Linux Server 5 (with the High Availability and Resilient Storage Add Ons)
- Red Hat Enterprise Linux Server 6 (with the High Availability and Resilient Storage Add Ons)
- Red Hat Enterprise Linux Server 7 (with the High Availability and Resilient Storage Add Ons)
- Red Hat Enterprise Linux Server 8 (with the High Availability and Resilient Storage Add Ons)
Issue
- How can you bind a
GFS2filesystem to a mount point?
Resolution
For RHEL 5 ( rgmanager ):
For RHEL 6 ( rgmanager ):
For RHEL 7 and 8 ( pacemaker ):
- Pacemaker's
Filesystemresource agent can be used to create thebindmount as discussed in below documentation:
-
When using a
gfs2active/active filesystem the resource can be cloned for concurrent bind mounts on multiple servers:# After creating the original filesystem resource: # pcs resource create <resource id> Filesystem device=<original mount point> directory=<new mount point> fstype=none options=bind clone interleave=true --group <gfs2 group> $ pcs resource create bindmnt Filesystem device=/mnt/gfs1 directory=/bind fstype=none options=bind clone interleave=true --group gfs2grp-clone
- Additional Note: The bind resource must be started after the original filesystem either using resource groups or constraints.
SBR
Product(s)
Category
Tags
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.