Repository navigation
pnfs-common: let a metadata server instance register under a key of its own - #30
Merged
Merged
Conversation
boddumanohar
force-pushed
the
feat/pnfs-mds-pr-key
branch
from
November 11, 2026 12:03
4409341 to
f46ccef
Compare
Guest image side of the warm-standby metadata server (simplyblock/simplyblock-operator#767). A guest boots with no state disk and no nfsd; mds-agent fences the devices, mounts the state volume, sets the reservation key, and only then lets nfsd start. - Kernel patch 0025: nfsd.pnfs_mds_pr_key lets a metadata server instance register under a reservation key of its own and serve only the devices it holds. - Kernel patch 0024: xfs.pnfs_discarded_free_space skips zeroing free space for write layouts once discarded blocks read as zeros. - No state disk fstab entry; nfs-server, nfs-mountd, and nfsdcld wait for /run/mds/active, which mds-agent creates on promotion. - CI: only main and pnfs-minimal move the shared pnfsos tags; other branches push commit-pinned tags. Co-authored-by: Christoph Engelbert (noctarius) <me@noctarius.com>
boddumanohar
force-pushed
the
feat/pnfs-mds-pr-key
branch
from
November 11, 2026 12:07
f46ccef to
7eee8a4
Compare
boddumanohar
marked this pull request as ready for review
November 11, 2026 12:10
mxsrc
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Guest image changes for the hot-standby pNFS metadata server in simplyblock/simplyblock-operator#767. With this image a guest boots as a standby: no state disk, and no nfsd until the operator promotes it. On promotion, mds-agent fences the devices, mounts the state volume, and starts nfsd. Each guest can register its own NVMe reservation key, so a promoted guest can preempt the old active.
Changes
nfsd.pnfs_mds_pr_key: au64module parameter that the agent writes before nfsd starts. While it is0, behavior does not change (one constant key). When it is set, nfsd does not register or reserve anything itself. It serves a device only while that key holds the device's reservation, so a device it does not hold is not exported and GETDEVICEINFO for it fails. The stale-key fence skips keys whose top byte is0x01, so a fenced instance never preempts a newer one. Writing the parameter while nfsd threads are running returnsEBUSY.xfs.pnfs_discarded_free_space: off by default. When it is set, and the filesystem is mounted with-o discardon a device whose discarded blocks read as zeros, XFS discards every extent it frees. After a full FITRIM, a zeroed write layout over a hole is allocated written, with no WRITE ZEROES. Motivation: one LAYOUTGET spent 15 s inblkdev_issue_zeroout.post-build.shno longer adds thevirtio-pnfs-statefstab entry, and it removes any old one, so a guest without the disk still reacheslocal-fs.target. On promotion, mds-agent mounts the state volume (the nfsdcld client-recovery DB) at/var/lib/nfs. TheRequiresMountsFor=/var/lib/nfsdrop-ins fornfs-serverandnfsdcldare deleted.nfs-server.serviceis no longer enabled at boot.nfs-server,nfs-mountd, andnfsdcldeach get astandby.confdrop-in withConditionPathExists=/run/mds/active. mds-agent creates that file once it has fenced every device, mounted the state volume, and set the reservation key.mds-agent.service: dropsRequiresMountsFor=/var/lib/nfsandAfter=nfs-server.service, so it starts at boot on a standby and answers the runner's health and Describe/Promote calls./var/lib/nfsafter tmpfiles has run, so mds-agent rerunssystemd-tmpfiles --createfor the export-root entries after the mount. The change here is a comment that documents this.pnfs-os.yml): onlymainandpnfs-minimalmove the sharedpnfsos/pnfsos-<arch>tags. Other branches push only the commit-pinnedpnfsos-<sha>tags.Testing
pnfs-minimal(6bc04ec). The full patch series 0001-0025 applies cleanly, in order, to linux-6.18.55 (tarball sha256 matcheslinux.hash).bash -npasses onpost-build.sh.pnfs-osworkflow builds it.Notes
/run/mds/active.pnfs-minimalnow uses 0022 and 0023 for the COPY layout-break and CB_OFFLOAD stateid fixes.