table of contents
- Tumbleweed 4.17.0+git18.92719d83-2.1
- Leap-16.0
- Leap-15.6
| OCF_HEARTBEAT_FILESY(7) | OCF resource agents | OCF_HEARTBEAT_FILESY(7) |
NAME¶
ocf_heartbeat_Filesystem - Manages filesystem mounts
SYNOPSIS¶
Filesystem [start | stop | monitor | meta-data | validate-all]
DESCRIPTION¶
Resource script for Filesystem. It manages a Filesystem on a shared storage medium.
The standard monitor operation of depth 0 (also known as probe) checks if the filesystem is mounted. If you want deeper tests, set OCF_CHECK_LEVEL to one of the following values:
10: read first 16 blocks of the device (raw read)
This doesn't exercise the filesystem at all, but the device on which the filesystem lives. This is noop for non-block devices such as NFS, SMBFS, or bind mounts.
20: test if a status file can be written and read
The status file must be writable by root. This is not always the case with an NFS mount, as NFS exports usually have the "root_squash" option set. In such a setup, you must either use read-only monitoring (depth=10), export with "no_root_squash" on your NFS server, or grant world write permissions on the directory where the status file is to be placed.
SUPPORTED PARAMETERS¶
device
NOTE: On Linux /dev/disk/by-{uuid,label}/ are preferred to -U/-L.
(required, string, no default)
directory
(required, string, no default)
fstype
(required, string, no default)
options
For bind mounts, add "bind" here and set fstype to "none". We will do the right thing for options such as "bind,ro".
(optional, string, no default)
statusfile_prefix
(optional, string, default ".Filesystem_status/")
run_fsck
"auto" : decide to run fsck depending on the fstype(default) "force" : always run fsck regardless of the fstype "no" : do not run fsck ever.
(optional, string, default "auto")
fast_stop
This defaults to "no" for GFS2 filesystems.
(optional, boolean, default no)
force_clones
Only set this to "true" if you know what you are doing!
(optional, boolean, default false)
force_unmount
"true" : Kill processes accessing mount point "safe" : Kill processes accessing mount point using methods that avoid functions that could potentially block during process detection "false" : Do not kill any processes. "move" : like "safe", but try to mount --move first
The 'safe' option uses shell logic to walk the /proc/<pid>/ directories for pids using the mount point while the default option uses the fuser cli tool. fuser is known to perform operations that can potentially block if unresponsive nfs mounts are in use on the system.
If new users of the file system are being spawned continuously by unmanaged 3rd party apps, we likely never win the race and the file system will be kept busy. Which may result in a timeout and stop failure, potentially escalating to hard-reset of this node via fencing.
The 'move' option tries to move the mount point somewhere those "rogue apps" do not expect it, then proceed to kill current users and attempt to umount.
For 'move' to work, you will have to make sure the mount point does not reside under a shared mount, for example by mount -o bind,private /mount /mount before mounting /mount/point.
(optional, string, default "true")
term_signals
(optional, string, default "TERM")
kill_signals
(optional, string, default "KILL")
signal_delay
(optional, string, default "1")
SUPPORTED ACTIONS¶
This resource agent supports the following actions (operations):
start
stop
monitor
validate-all
meta-data
EXAMPLE CRM SHELL¶
The following is an example configuration for a Filesystem resource using the crm(8) shell:
primitive p_Filesystem ocf:heartbeat:Filesystem \
params \
device=string \
directory=string \
fstype=string \
op monitor depth="0" timeout="40s" interval="20s"
EXAMPLE PCS¶
The following is an example configuration for a Filesystem resource using pcs(8)
pcs resource create p_Filesystem ocf:heartbeat:Filesystem \
device=string \
directory=string \
fstype=string \
op monitor OCF_CHECK_LEVEL="0" timeout="40s" interval="20s"
SEE ALSO¶
AUTHOR¶
ClusterLabs contributors (see the resource agent source for information about individual authors)
| 12/22/2025 | resource-agents UNKNOWN |