OCF_HEARTBEAT_GANESH(7)
π ocf_heartbeat_ganesha-nfs β the manual page, but make it make sense β¨
okay so bestie, this is a page from the OCF resource agents collection, and it's literally about ocf_heartbeat_ganesha-nfs β the resource agent that runs your NFS-Ganesha setup in a cluster. grab a lil snack, we're getting into it π
πΈ NAME πΈ
ocf_heartbeat_ganesha-nfs β manages an NFS-Ganesha server instance. that's the whole vibe. it's giving "one server, one resource, high availability realness" π
β¨ SYNOPSIS β¨
ganesha-nfs [start | stop | monitor | meta-data | validate-all]
those are your five moves, bestie. pick one π
π¦ DESCRIPTION π¦
So what this agent actually does: it manages a single NFS-Ganesha (ganesha.nfsd) server instance as a cluster resource β for HA NFS on DRBD/LINSTOR-backed storage. v cute, v serious. π
There are two modes, and you need to know which one you're in:
- If
export_pathis set, the agent renders an ephemeralganesha.confunderruntime_dirfrom the OCF parameters and starts ganesha against it. This is theexportfs(8)model β runtime realisation, nothing persisted. very main character, no strings attached β¨ - If
export_pathis empty andconfig_filepoints at an existing file, that file is used verbatim (legacy/static mode). old-school, respect it π
A single ganesha process can serve several exports: export_path, export_id and pseudo accept ;-separated lists, zipped positionally (one EXPORT block per entry). All exports share one service IP, one clients whitelist, and the other scalar parameters. sharing is caring fr fr π«Ά
β οΈ The agent does not manage kernel NFS, /var/lib/nfs, rpcbind, or statd. don't come for it for things it never signed up to do π
π₯ CRITICAL: the NFSv4 RecoveryDir must live on the replicated filesystem this resource fails over with, or clients lose their locks on failover. like, not optional. this is the whole ballgame.
π SUPPORTED PARAMETERS π
so many parameters, and honestly? every single one is iconic. here we go π
export_pathβ server-side directory to export, on the replicated FS. Setting this switches the agent into generated mode (it rendersganesha.conffrom its parameters). May be a;-separated list to export several directories from one ganesha process. (optional, string, no default)export_idβ the NFSExport_Id(uint16, 1-65535), or a;-separated list parallel toexport_path. Must be unique and stable per server; collision-free assignment is the caller's responsibility. Defaults to the export's 1-based position if omitted. (optional, integer, default 1)pseudoβ NFSv4 pseudo path, or a;-separated list parallel toexport_path. Each entry defaults to itsexport_pathif unset; must be unique per export. (optional, string, no default)clientsβ client spec for theCLIENTwhitelist (e.g."10.1.10.0/24", a bare IPv6 likefd00:10:1:10::3, or"*"). REQUIRED in generated mode β deny-default, bestie: no clients means nobody can mount. Use"*"explicitly to allow all reachable clients. choose your fighters wisely π (optional, string, no default)access_typeβ access type granted to whitelisted clients:RW,RO, orNone. (optional, string, default"RW")squashβ UID/GID squashing:Root_Squash,No_Root_Squash, orAll_Squash. squash that root, or don't π (optional, string, default"Root_Squash")anonuidβ numeric uid that squashed requests are mapped to (Anonymous_Uid). When unset, ganesha's built-in default of-2(uid 4294967294) applies β and note that this is NOT the common'nobody'uid 65534, so squashed clients can usually not write anywhere. Set to65534(or the uid owning the export directory) to allow squashed clients to write. Shared by all exports of this instance. this one trips everybody up, no cap π (optional, string, no default)anongidβ numeric gid that squashed requests are mapped to (Anonymous_Gid). When unset, ganesha's built-in default of-2(gid 4294967294) applies. Shared by all exports of this instance. (optional, string, no default)sectypeβ security flavour:sys,krb5,krb5i,krb5p. (optional, string, default"sys")protocolsβ NFS protocol versions to offer, e.g."3,4"or"4". (optional, string, default"3,4")fsalβ Ganesha FSAL name (VFS,GLUSTER,CEPH, ...). (optional, string, default"VFS")server_scopeβ NFSv4Server_Scope(RFC 8881 server scope). MUST be set to the same value on all nodes that can run this resource, e.g. the service IP or a cluster name. Without it, ganesha derives the scope from the local hostname β so after a failover NFSv4.1+ clients see a different scope, refuse to reclaim their open/lock state, and I/O on files that were open hangs indefinitely. this is a "whole cluster depends on it" situation, fr. also note: setting or changing this value is itself a scope change β existing client state cannot be reclaimed across the reconfiguration. π₯ (optional, string, no default)enable_nlmβ whether to enable NLM (file locking for NFSv3 clients). With NLM enabled, ganesha always waits out the full grace period on every start/failover, because NLM lock reclaims have no completion signal β and NFSv4 I/O on open files stalls for that long. With NLM disabled, grace ends as soon as all NFSv4.1+ clients have reclaimed (typically seconds), NFSv3 reads/writes are unaffected, but NFSv3 lock requests fail. Also note: NFSv3 lock recovery additionally requires anrpc.statd/SM_NOTIFYsetup that this agent does not manage β without one, NFSv3 locks are silently lost on failover even with NLM enabled. so, you know, pick your struggle π (optional, boolean, default true)grace_periodβ NFSv4Grace_Periodin seconds (0-180; ganesha default 90). Upper bound on how long clients have to reclaim state after a failover; stateful NFSv4 operations from clients that have finished reclaiming may still be blocked until grace ends (seeenable_nlm). Must be at leastlease_lifetime, or clients that were briefly unreachable lose their state silently. π (optional, integer, no default)lease_lifetimeβ NFSv4Lease_Lifetimein seconds (1-120; ganesha default 60). How long the server holds a client's state without renewal. Lower values shorten failover recovery but increase renewal traffic and the risk of spurious state loss for slow clients. tradeoffs, always tradeoffs π (optional, integer, no default)recovery_dirβ NFSv4RecoveryDir(server-wide singleton). MUST be on the replicated FS. Defaults to a hidden dir under the firstexport_path. yes this is the critical one from earlier, hi again π (optional, string, no default)runtime_dirβ directory for the ephemeral generated config (tmpfs recommended). (optional, string, default"/run/ganesha")config_fileβ legacy mode only: path to a pre-existingganesha.conf. Ignored whenexport_pathis set. (optional, string, default"/etc/ganesha/ganesha.conf")pid_fileβ PID file. Must be unique across co-located instances. no sharing, bestie π« (unique, optional, string, default"/run/ganesha.pid")log_fileβ Ganesha log file path. (optional, string, default"/var/log/ganesha/ganesha.log")log_levelβ Ganesha log level (NIV_EVENT,NIV_INFO,NIV_DEBUG, ...). (optional, string, default"NIV_EVENT")nfs_ipβ service IP (v4 or v6) to bind and probe. Each co-located instance should use a distinct IP. (optional, string, no default)nfs_portβ TCP port to bind/probe. (optional, integer, default 2049)start_timeoutβ seconds to wait for readiness (PID + listening port). (optional, integer, default 30)
π SUPPORTED ACTIONS π
this resource agent supports the following actions (operations) β a whole menu of them, slay:
startβ starts the resource. Suggested minimum timeout: 60s.stopβ stops the resource. Suggested minimum timeout: 60s.monitorβ performs a detailed status check. Suggested minimum timeout: 20s. Suggested interval: 30s. (your little wellness check π«Ά)meta-dataβ retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5s.validate-allβ performs a validation of the resource configuration. Suggested minimum timeout: 20s.
π§ EXAMPLE CRM SHELL π§
here's an example config for a ganesha-nfs resource using the crm(8) shell β copy-paste ready, you're welcome π
primitive p_ganesha-nfs ocf:heartbeat:ganesha-nfs \
op monitor timeout="20s" interval="30s"
β EXAMPLE PCS β
and here's the same energy, but for pcs(8):
pcs resource create p_ganesha-nfs ocf:heartbeat:ganesha-nfs \
op monitor timeout="20s" interval="30s"
π SEE ALSO π
http://clusterlabs.org/β go visit, they're the blueprint fr
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). they ate and left no crumbs π
π aww and that's the page! brought to you by resource-agents UNKNOWN, dated 10/01/2026 β that's the version and date, cute right? now go configure your cluster, bestie, you've got this πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms