[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F9DTNB0KFR2CTVV023DW5G":3,"skill-same:01M6F9DTNB0KFR2CTVV023DW5G":75},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":30,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6F9DTNB0KFR2CTVV023DW5G","nfs-storage",null,"Configure NFS servers and clients. Implement network file sharing for Linux systems. Use when setting up shared storage.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-nfs-storage\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"storage","nfs","nfs storage","community","2026","when","relevant","scripts","critical","os","platform","shared","main","linux","agent-skills","up","only","configure","access","devops-security","network","license","security","2026-11-10 10:12:30",false,"---\nname: nfs-storage\ndescription: Configure NFS servers and clients. Implement network file sharing for\n  Linux systems. Use when setting up shared storage.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# NFS Storage\n\nConfigure NFS servers and clients for network file sharing across Linux systems. Covers NFSv4 server setup, export options, client mounting, autofs for on-demand mounts, Kerberos security, performance tuning, and Kubernetes integration.\n\n## When to Use\n\n- Sharing directories between multiple Linux servers (web farms, build clusters)\n- Providing shared storage for containerized workloads (Kubernetes ReadWriteMany)\n- Centralizing home directories or application data across a fleet\n- Setting up a development environment with shared project files\n- Migrating from local storage to network-attached storage\n\n## Prerequisites\n\n- NFS server: `nfs-kernel-server` (Debian\u002FUbuntu) or `nfs-utils` (RHEL\u002FCentOS)\n- NFS client: `nfs-common` (Debian\u002FUbuntu) or `nfs-utils` (RHEL\u002FCentOS)\n- Network connectivity between server and clients (TCP\u002FUDP 2049 for NFSv4)\n- Firewall rules allowing NFS traffic\n- For NFSv4 Kerberos: `krb5-user` and a functioning KDC\n\n## NFS Server Setup\n\n### Installation\n\n```bash\n# Debian \u002F Ubuntu\napt update && apt install -y nfs-kernel-server\n\n# RHEL \u002F CentOS\ndnf install -y nfs-utils\n\n# Enable and start the NFS server\nsystemctl enable --now nfs-server\n\n# Verify NFS is running\nsystemctl status nfs-server\nrpcinfo -p | grep nfs\n```\n\n### Export Configuration (\u002Fetc\u002Fexports)\n\nThese are export-file entries, not shell commands. Limit clients and exports explicitly; root_squash is the safer baseline, not a substitute for client trust or authentication.\n\n```text\n# \u002Fetc\u002Fexports\n# Syntax: \u003Cdirectory> \u003Cclient-spec>(options)\n\n# Share \u002Fdata to a specific subnet with read-write access\n\u002Fdata 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\n# Share \u002Fshared read-only to everyone\n\u002Fshared *(ro,sync,no_subtree_check)\n\n# Share \u002Fhome to specific hosts\n\u002Fhome server01.example.com(rw,sync,no_subtree_check)\n\u002Fhome server02.example.com(rw,sync,no_subtree_check)\n\n# Share \u002Fvar\u002Fnfs\u002Fprojects with root squash (default, map root to nobody)\n\u002Fvar\u002Fnfs\u002Fprojects 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\n# NFSv4 pseudo-root export (recommended for NFSv4)\n\u002Fsrv\u002Fnfs 10.0.0.0\u002F24(rw,sync,fsid=0,crossmnt,no_subtree_check)\n\u002Fsrv\u002Fnfs\u002Fdata 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\u002Fsrv\u002Fnfs\u002Fshared 10.0.0.0\u002F24(ro,sync,no_subtree_check)\n```\n\n### Export Options Explained\n\n| Option | Description |\n|---|---|\n| `rw` | Read-write access |\n| `ro` | Read-only access |\n| `sync` | Write data to disk before replying (safe, slower) |\n| `async` | Reply before data is written to disk (fast, risk of corruption) |\n| `no_subtree_check` | Disable subtree checking (improves reliability) |\n| `root_squash` | Map remote root (UID 0) to `nobody` (default, more secure) |\n| `no_root_squash` | Allow remote root to act as root on the server (use cautiously) |\n| `all_squash` | Map all remote UIDs\u002FGIDs to `nobody` |\n| `anonuid=1000` | Map anonymous users to a specific UID |\n| `anongid=1000` | Map anonymous groups to a specific GID |\n| `crossmnt` | Allow clients to traverse into sub-mounts |\n| `fsid=0` | Mark as the NFSv4 pseudo-root |\n\n### Applying Export Changes\n\n```bash\n# Apply changes to exports (no server restart needed)\nexportfs -ra\n\n# Show current exports\nexportfs -v\n\n# Export a new directory on the fly (temporary, not persistent)\nexportfs -o rw,sync,no_subtree_check 10.0.0.0\u002F24:\u002Ftmp\u002Fshare\n\n# Unexport a directory\nexportfs -u 10.0.0.0\u002F24:\u002Ftmp\u002Fshare\n```\n\n### Server Firewall Configuration\n\n```bash\n# UFW (Ubuntu)\nufw allow from 10.0.0.0\u002F24 to any port nfs\nufw allow from 10.0.0.0\u002F24 to any port 111   # rpcbind (NFSv3)\n\n# firewalld (RHEL\u002FCentOS)\nfirewall-cmd --permanent --add-service=nfs\nfirewall-cmd --permanent --add-service=rpc-bind\nfirewall-cmd --permanent --add-service=mountd\nfirewall-cmd --reload\n\n# NFSv4 only needs TCP 2049 (no rpcbind or mountd)\nfirewall-cmd --permanent --add-port=2049\u002Ftcp\nfirewall-cmd --reload\n```\n\n## NFS Client Configuration\n\n### Manual Mounting\n\n```bash\n# Install NFS client\napt install -y nfs-common        # Debian\u002FUbuntu\ndnf install -y nfs-utils         # RHEL\u002FCentOS\n\n# Discover exports from the server\nshowmount -e nfs-server.example.com\n\n# Mount an NFS share manually\nmkdir -p \u002Fmnt\u002Fdata\nmount -t nfs nfs-server.example.com:\u002Fdata \u002Fmnt\u002Fdata\n\n# Mount with specific NFS version and options\nmount -t nfs -o vers=4.2,tcp,hard,intr nfs-server.example.com:\u002Fdata \u002Fmnt\u002Fdata\n\n# Verify the mount\nmount | grep nfs\ndf -hT \u002Fmnt\u002Fdata\n\n# Unmount\numount \u002Fmnt\u002Fdata\n```\n\n### Persistent Mounts via \u002Fetc\u002Ffstab\n\nThese entries belong in fstab, not a shell.\n\n```text\n# \u002Fetc\u002Ffstab entries for NFS\n\n# Basic NFSv4 mount\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  defaults,_netdev  0  0\n\n# Mount with performance and reliability options\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  hard,intr,rsize=1048576,wsize=1048576,timeo=600,retrans=3,_netdev  0  0\n\n# Read-only mount\nnfs-server.example.com:\u002Fshared  \u002Fmnt\u002Fshared  nfs4  ro,_netdev  0  0\n\n# NFS identity mapping is configured through consistent server\u002Fclient identities\n# or supported NFSv4 idmapping\u002FKerberos, not generic uid=\u002Fgid= mount options.\n```\n\n```bash\n# Mount all fstab entries\nmount -a\n\n# Test fstab entry without actually mounting\nmount --fake -a -v\n```\n\n### Mount Options Explained\n\n| Option | Description |\n|---|---|\n| `hard` | Retry NFS requests indefinitely (recommended for data integrity) |\n| `soft` | Return error after `retrans` retries (risk of data corruption) |\n| `intr` | Historical option, ignored by modern Linux kernels; do not rely on it for interruption |\n| `rsize=1048576` | Read buffer size in bytes (1 MB, max for NFSv4) |\n| `wsize=1048576` | Write buffer size in bytes (1 MB) |\n| `timeo=600` | Timeout in tenths of a second (60 seconds) |\n| `retrans=3` | Number of retries before error (soft) or message (hard) |\n| `_netdev` | Wait for network before mounting (critical for boot) |\n| `noatime` | Do not update access time (improves performance) |\n| `nconnect=8` | Use multiple TCP connections (kernel 5.3+, improves throughput) |\n\n## Autofs (On-Demand Mounting)\n\n```bash\n# Install autofs\napt install -y autofs        # Debian\u002FUbuntu\ndnf install -y autofs        # RHEL\u002FCentOS\n\n# Configure the master map\n# \u002Fetc\u002Fauto.master or \u002Fetc\u002Fauto.master.d\u002Fnfs.autofs\n\u002Fmnt\u002Fnfs  \u002Fetc\u002Fauto.nfs  --timeout=300\n```\n\n### \u002Fetc\u002Fauto.nfs\n\n```text\n# Format: mount-point  options  location\n# Mounts will appear under \u002Fmnt\u002Fnfs\u002F\u003Cmount-point>\n\ndata    -rw,hard,intr,rsize=1048576,wsize=1048576    nfs-server.example.com:\u002Fdata\nshared  -ro,hard,intr                                  nfs-server.example.com:\u002Fshared\nhome    -rw,hard,intr                                  nfs-server.example.com:\u002Fhome\u002F&\n\n# Wildcard: mount any subdirectory from the server automatically\n# \u002Fetc\u002Fauto.master entry:  \u002Fmnt\u002Fnfs  \u002Fetc\u002Fauto.nfs\n*       -rw,hard,intr    nfs-server.example.com:\u002Fsrv\u002Fnfs\u002F&\n```\n\n```bash\n# Enable and start autofs\nsystemctl enable --now autofs\n\n# Test: simply cd into the mount point and it appears\nls \u002Fmnt\u002Fnfs\u002Fdata    # Triggers auto-mount\n# The share unmounts automatically after the timeout (300 seconds idle)\n\n# Check autofs status\nsystemctl status autofs\nautomount -v    # Verbose debugging mode (foreground)\n```\n\nBefore mutable exports, firewall\u002Ffstab changes, remounts or benchmarks, confirm host\u002Fpath\u002Fclient scope, preserve config and validate access\u002Frecovery. The dd\u002Ffio examples create\u002Fdelete data and generate load: use an empty dedicated scratch export and unique file names, verify capacity, never run against user data. Kerberos is mentioned but not fully configured here; consult target distro guidance. See [Linux NFS mount semantics](https:\u002F\u002Fman7.org\u002Flinux\u002Fman-pages\u002Fman5\u002Fnfs.5.html).\n\n## Performance Tuning\n\n### Server-Side Tuning\n\n```bash\n# Increase the number of NFS daemon threads (default is 8)\n# \u002Fetc\u002Fdefault\u002Fnfs-kernel-server (Debian) or \u002Fetc\u002Fsysconfig\u002Fnfs (RHEL)\nRPCNFSDCOUNT=32\n\n# Or set at runtime\necho 32 > \u002Fproc\u002Ffs\u002Fnfsd\u002Fthreads\n\n# Restart NFS to apply\nsystemctl restart nfs-server\n\n# Tune NFS server read\u002Fwrite sizes in sysctl\n# These are auto-negotiated but can be adjusted\necho 1048576 > \u002Fproc\u002Ffs\u002Fnfsd\u002Fmax_block_size\n\n# Kernel network buffer tuning (see performance-tuning skill)\nsysctl -w net.core.rmem_max=134217728\nsysctl -w net.core.wmem_max=134217728\n```\n\n### Client-Side Tuning\n\n```bash\n# Use large read\u002Fwrite buffer sizes in mount options\nmount -t nfs4 -o rsize=1048576,wsize=1048576,noatime nfs-server:\u002Fdata \u002Fmnt\u002Fdata\n\n# Use multiple TCP connections (Linux kernel 5.3+)\nmount -t nfs4 -o nconnect=8 nfs-server:\u002Fdata \u002Fmnt\u002Fdata\n\n# Check current mount options and NFS statistics\nnfsstat -c                    # Client NFS statistics\nnfsstat -s                    # Server NFS statistics\nmountstats \u002Fmnt\u002Fdata          # Detailed per-mount stats\n\n# Test NFS throughput with dd\ndd if=\u002Fdev\u002Fzero of=\u002Fmnt\u002Fdata\u002Ftestfile bs=1M count=1024 oflag=direct\ndd if=\u002Fmnt\u002Fdata\u002Ftestfile of=\u002Fdev\u002Fnull bs=1M iflag=direct\nrm \u002Fmnt\u002Fdata\u002Ftestfile\n\n# Test with fio for more realistic workloads\nfio --name=nfs-test --directory=\u002Fmnt\u002Fdata --ioengine=libaio --direct=1 \\\n  --rw=randrw --bs=4k --numjobs=4 --size=1G --runtime=60 --group_reporting\n```\n\n## Kubernetes NFS Integration\n\n```yaml\n# nfs-pv.yaml -- Static PersistentVolume\napiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: nfs-pv\nspec:\n  capacity:\n    storage: 100Gi\n  accessModes:\n    - ReadWriteMany\n  persistentVolumeReclaimPolicy: Retain\n  storageClassName: nfs\n  nfs:\n    server: nfs-server.example.com\n    path: \u002Fdata\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: nfs-pvc\nspec:\n  accessModes:\n    - ReadWriteMany\n  storageClassName: nfs\n  resources:\n    requests:\n      storage: 100Gi\n```\n\n```bash\n# For dynamic provisioning, install the NFS CSI driver via Helm\nhelm repo add csi-driver-nfs https:\u002F\u002Fraw.githubusercontent.com\u002Fkubernetes-csi\u002Fcsi-driver-nfs\u002Fmaster\u002Fcharts\nhelm install csi-driver-nfs csi-driver-nfs\u002Fcsi-driver-nfs --namespace kube-system\n# Then create a StorageClass pointing to your NFS server and share path.\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| mount: access denied | `showmount -e server`, `exportfs -v` | Check \u002Fetc\u002Fexports, run `exportfs -ra`, verify subnet |\n| mount hangs | `mount -v`, check network | Verify firewall allows TCP 2049; use `bg` mount option |\n| Stale file handle | `ls \u002Fmnt\u002Fdata` returns stale error | Unmount and remount: `umount -f \u002Fmnt\u002Fdata && mount -a` |\n| Permission denied on files | `ls -la`, check UID mapping | Match UIDs or use `all_squash,anonuid=1000,anongid=1000` |\n| Slow NFS performance | `nfsstat -c`, `mountstats \u002Fmnt\u002Fdata` | Increase rsize\u002Fwsize, add nconnect=8, tune NFS threads |\n| Autofs not mounting | `systemctl status autofs`, `automount -v` | Check \u002Fetc\u002Fauto.master syntax, verify server is reachable |\n| NFSv4 ID mapping wrong | `id username` on both sides | Ensure matching domain in `\u002Fetc\u002Fidmapd.conf` |\n| Boot hangs waiting for NFS | Check fstab options | Add `_netdev` and `bg` options to fstab entry |\n| Docker volume mount fails | `docker volume inspect`, `dmesg` | Verify NFS client packages installed on Docker host |\n\n## Related Skills\n\n- `linux-administration` -- Server setup and network configuration\n- `block-storage` -- Underlying storage for NFS server data directories\n- `performance-tuning` -- Kernel and network tuning for NFS throughput\n- `backup-recovery` -- Backing up NFS-hosted data\n- `object-storage` -- Alternative storage model for cloud-native workloads\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# NFS Storage\n\nConfigure NFS servers and clients for network file sharing across Linux systems. Covers NFSv4 server setup, export options, client mounting, autofs for on-demand mounts, Kerberos security, performance tuning, and Kubernetes integration.\n\n## When to Use\n\n- Sharing directories between multiple Linux servers (web farms, build clusters)\n- Providing shared storage for containerized workloads (Kubernetes ReadWriteMany)\n- Centralizing home directories or application data across a fleet\n- Setting up a development environment with shared project files\n- Migrating from local storage to network-attached storage\n\n## Prerequisites\n\n- NFS server: `nfs-kernel-server` (Debian\u002FUbuntu) or `nfs-utils` (RHEL\u002FCentOS)\n- NFS client: `nfs-common` (Debian\u002FUbuntu) or `nfs-utils` (RHEL\u002FCentOS)\n- Network connectivity between server and clients (TCP\u002FUDP 2049 for NFSv4)\n- Firewall rules allowing NFS traffic\n- For NFSv4 Kerberos: `krb5-user` and a functioning KDC\n\n## NFS Server Setup\n\n### Installation\n\n```bash\n# Debian \u002F Ubuntu\napt update && apt install -y nfs-kernel-server\n\n# RHEL \u002F CentOS\ndnf install -y nfs-utils\n\n# Enable and start the NFS server\nsystemctl enable --now nfs-server\n\n# Verify NFS is running\nsystemctl status nfs-server\nrpcinfo -p | grep nfs\n```\n\n### Export Configuration (\u002Fetc\u002Fexports)\n\nThese are export-file entries, not shell commands. Limit clients and exports explicitly; root_squash is the safer baseline, not a substitute for client trust or authentication.\n\n```text\n# \u002Fetc\u002Fexports\n# Syntax: \u003Cdirectory> \u003Cclient-spec>(options)\n\n# Share \u002Fdata to a specific subnet with read-write access\n\u002Fdata 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\n# Share \u002Fshared read-only to everyone\n\u002Fshared *(ro,sync,no_subtree_check)\n\n# Share \u002Fhome to specific hosts\n\u002Fhome server01.example.com(rw,sync,no_subtree_check)\n\u002Fhome server02.example.com(rw,sync,no_subtree_check)\n\n# Share \u002Fvar\u002Fnfs\u002Fprojects with root squash (default, map root to nobody)\n\u002Fvar\u002Fnfs\u002Fprojects 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\n# NFSv4 pseudo-root export (recommended for NFSv4)\n\u002Fsrv\u002Fnfs 10.0.0.0\u002F24(rw,sync,fsid=0,crossmnt,no_subtree_check)\n\u002Fsrv\u002Fnfs\u002Fdata 10.0.0.0\u002F24(rw,sync,no_subtree_check,root_squash)\n\u002Fsrv\u002Fnfs\u002Fshared 10.0.0.0\u002F24(ro,sync,no_subtree_check)\n```\n\n### Export Options Explained\n\n| Option | Description |\n|---|---|\n| `rw` | Read-write access |\n| `ro` | Read-only access |\n| `sync` | Write data to disk before replying (safe, slower) |\n| `async` | Reply before data is written to disk (fast, risk of corruption) |\n| `no_subtree_check` | Disable subtree checking (improves reliability) |\n| `root_squash` | Map remote root (UID 0) to `nobody` (default, more secure) |\n| `no_root_squash` | Allow remote root to act as root on the server (use cautiously) |\n| `all_squash` | Map all remote UIDs\u002FGIDs to `nobody` |\n| `anonuid=1000` | Map anonymous users to a specific UID |\n| `anongid=1000` | Map anonymous groups to a specific GID |\n| `crossmnt` | Allow clients to traverse into sub-mounts |\n| `fsid=0` | Mark as the NFSv4 pseudo-root |\n\n### Applying Export Changes\n\n```bash\n# Apply changes to exports (no server restart needed)\nexportfs -ra\n\n# Show current exports\nexportfs -v\n\n# Export a new directory on the fly (temporary, not persistent)\nexportfs -o rw,sync,no_subtree_check 10.0.0.0\u002F24:\u002Ftmp\u002Fshare\n\n# Unexport a directory\nexportfs -u 10.0.0.0\u002F24:\u002Ftmp\u002Fshare\n```\n\n### Server Firewall Configuration\n\n```bash\n# UFW (Ubuntu)\nufw allow from 10.0.0.0\u002F24 to any port nfs\nufw allow from 10.0.0.0\u002F24 to any port 111   # rpcbind (NFSv3)\n\n# firewalld (RHEL\u002FCentOS)\nfirewall-cmd --permanent --add-service=nfs\nfirewall-cmd --permanent --add-service=rpc-bind\nfirewall-cmd --permanent --add-service=mountd\nfirewall-cmd --reload\n\n# NFSv4 only needs TCP 2049 (no rpcbind or mountd)\nfirewall-cmd --permanent --add-port=2049\u002Ftcp\nfirewall-cmd --reload\n```\n\n## NFS Client Configuration\n\n### Manual Mounting\n\n```bash\n# Install NFS client\napt install -y nfs-common        # Debian\u002FUbuntu\ndnf install -y nfs-utils         # RHEL\u002FCentOS\n\n# Discover exports from the server\nshowmount -e nfs-server.example.com\n\n# Mount an NFS share manually\nmkdir -p \u002Fmnt\u002Fdata\nmount -t nfs nfs-server.example.com:\u002Fdata \u002Fmnt\u002Fdata\n\n# Mount with specific NFS version and options\nmount -t nfs -o vers=4.2,tcp,hard,intr nfs-server.example.com:\u002Fdata \u002Fmnt\u002Fdata\n\n# Verify the mount\nmount | grep nfs\ndf -hT \u002Fmnt\u002Fdata\n\n# Unmount\numount \u002Fmnt\u002Fdata\n```\n\n### Persistent Mounts via \u002Fetc\u002Ffstab\n\nThese entries belong in fstab, not a shell.\n\n```text\n# \u002Fetc\u002Ffstab entries for NFS\n\n# Basic NFSv4 mount\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  defaults,_netdev  0  0\n\n# Mount with performance and reliability options\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  hard,intr,rsize=1048576,wsize=1048576,timeo=600,retrans=3,_netdev  0  0\n\n# Read-only mount\nnfs-server.example.com:\u002Fshared  \u002Fmnt\u002Fshared  nfs4  ro,_netdev  0  0\n\n# NFS identity mapping is configured through consistent server\u002Fclient identities\n# or supported NFSv4 idmapping\u002FKerberos, not generic uid=\u002Fgid= mount options.\n```\n\n```bash\n# Mount all fstab entries\nmount -a\n\n# Test fstab entry without actually mounting\nmount --fake -a -v\n```\n\n### Mount Options Explained\n\n| Option | Description |\n|---|---|\n| `hard` | Retry NFS requests indefinitely (recommended for data integrity) |\n| `soft` | Return error after `retrans` retries (risk of data corruption) |\n| `intr` | Historical option, ignored by modern Linux kernels; do not rely on it for interruption |\n| `rsize=1048576` | Read buffer size in bytes (1 MB, max for NFSv4) |\n| `wsize=1048576` | Write buffer size in bytes (1 MB) |\n| `timeo=600` | Timeout in tenths of a second (60 seconds) |\n| `retrans=3` | Number of retries before error (soft) or message (hard) |\n| `_netdev` | Wait for network before mounting (critical for boot) |\n| `noatime` | Do not update access time (improves performance) |\n| `nconnect=8` | Use multiple TCP connections (kernel 5.3+, improves throughput) |\n\n## Autofs (On-Demand Mounting)\n\n```bash\n# Install autofs\napt install -y autofs        # Debian\u002FUbuntu\ndnf install -y autofs        # RHEL\u002FCentOS\n\n# Configure the master map\n# \u002Fetc\u002Fauto.master or \u002Fetc\u002Fauto.master.d\u002Fnfs.autofs\n\u002Fmnt\u002Fnfs  \u002Fetc\u002Fauto.nfs  --timeout=300\n```\n\n### \u002Fetc\u002Fauto.nfs\n\n```text\n# Format: mount-point  options  location\n# Mounts will appear under \u002Fmnt\u002Fnfs\u002F\u003Cmount-point>\n\ndata    -rw,hard,intr,rsize=1048576,wsize=1048576    nfs-server.example.com:\u002Fdata\nshared  -ro,hard,intr                                  nfs-server.example.com:\u002Fshared\nhome    -rw,hard,intr                                  nfs-server.example.com:\u002Fhome\u002F&\n\n# Wildcard: mount any subdirectory from the server automatically\n# \u002Fetc\u002Fauto.master entry:  \u002Fmnt\u002Fnfs  \u002Fetc\u002Fauto.nfs\n*       -rw,hard,intr    nfs-server.example.com:\u002Fsrv\u002Fnfs\u002F&\n```\n\n```bash\n# Enable and start autofs\nsystemctl enable --now autofs\n\n# Test: simply cd into the mount point and it appears\nls \u002Fmnt\u002Fnfs\u002Fdata    # Triggers auto-mount\n# The share unmounts automatically after the timeout (300 seconds idle)\n\n# Check autofs status\nsystemctl status autofs\nautomount -v    # Verbose debugging mode (foreground)\n```\n\nBefore mutable exports, firewall\u002Ffstab changes, remounts or benchmarks, confirm host\u002Fpath\u002Fclient scope, preserve config and validate access\u002Frecovery. The dd\u002Ffio examples create\u002Fdelete data and generate load: use an empty dedicated scratch export and unique file names, verify capacity, never run against user data. Kerberos is mentioned but not fully configured here; consult target distro guidance. See [Linux NFS mount semantics](https:\u002F\u002Fman7.org\u002Flinux\u002Fman-pages\u002Fman5\u002Fnfs.5.html).\n\n## Performance Tuning\n\n### Server-Side Tuning\n\n```bash\n# Increase the number of NFS daemon threads (default is 8)\n# \u002Fetc\u002Fdefault\u002Fnfs-kernel-server (Debian) or \u002Fetc\u002Fsysconfig\u002Fnfs (RHEL)\nRPCNFSDCOUNT=32\n\n# Or set at runtime\necho 32 > \u002Fproc\u002Ffs\u002Fnfsd\u002Fthreads\n\n# Restart NFS to apply\nsystemctl restart nfs-server\n\n# Tune NFS server read\u002Fwrite sizes in sysctl\n# These are auto-negotiated but can be adjusted\necho 1048576 > \u002Fproc\u002Ffs\u002Fnfsd\u002Fmax_block_size\n\n# Kernel network buffer tuning (see performance-tuning skill)\nsysctl -w net.core.rmem_max=134217728\nsysctl -w net.core.wmem_max=134217728\n```\n\n### Client-Side Tuning\n\n```bash\n# Use large read\u002Fwrite buffer sizes in mount options\nmount -t nfs4 -o rsize=1048576,wsize=1048576,noatime nfs-server:\u002Fdata \u002Fmnt\u002Fdata\n\n# Use multiple TCP connections (Linux kernel 5.3+)\nmount -t nfs4 -o nconnect=8 nfs-server:\u002Fdata \u002Fmnt\u002Fdata\n\n# Check current mount options and NFS statistics\nnfsstat -c                    # Client NFS statistics\nnfsstat -s                    # Server NFS statistics\nmountstats \u002Fmnt\u002Fdata          # Detailed per-mount stats\n\n# Test NFS throughput with dd\ndd if=\u002Fdev\u002Fzero of=\u002Fmnt\u002Fdata\u002Ftestfile bs=1M count=1024 oflag=direct\ndd if=\u002Fmnt\u002Fdata\u002Ftestfile of=\u002Fdev\u002Fnull bs=1M iflag=direct\nrm \u002Fmnt\u002Fdata\u002Ftestfile\n\n# Test with fio for more realistic workloads\nfio --name=nfs-test --directory=\u002Fmnt\u002Fdata --ioengine=libaio --direct=1 \\\n  --rw=randrw --bs=4k --numjobs=4 --size=1G --runtime=60 --group_reporting\n```\n\n## Kubernetes NFS Integration\n\n```yaml\n# nfs-pv.yaml -- Static PersistentVolume\napiVersion: v1\nkind: PersistentVolume\nmetadata:\n  name: nfs-pv\nspec:\n  capacity:\n    storage: 100Gi\n  accessModes:\n    - ReadWriteMany\n  persistentVolumeReclaimPolicy: Retain\n  storageClassName: nfs\n  nfs:\n    server: nfs-server.example.com\n    path: \u002Fdata\n---\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: nfs-pvc\nspec:\n  accessModes:\n    - ReadWriteMany\n  storageClassName: nfs\n  resources:\n    requests:\n      storage: 100Gi\n```\n\n```bash\n# For dynamic provisioning, install the NFS CSI driver via Helm\nhelm repo add csi-driver-nfs https:\u002F\u002Fraw.githubusercontent.com\u002Fkubernetes-csi\u002Fcsi-driver-nfs\u002Fmaster\u002Fcharts\nhelm install csi-driver-nfs csi-driver-nfs\u002Fcsi-driver-nfs --namespace kube-system\n# Then create a StorageClass pointing to your NFS server and share path.\n```\n\n## Troubleshooting\n\n| Symptom | Diagnostic Command | Common Fix |\n|---|---|---|\n| mount: access denied | `showmount -e server`, `exportfs -v` | Check \u002Fetc\u002Fexports, run `exportfs -ra`, verify subnet |\n| mount hangs | `mount -v`, check network | Verify firewall allows TCP 2049; use `bg` mount option |\n| Stale file handle | `ls \u002Fmnt\u002Fdata` returns stale error | Unmount and remount: `umount -f \u002Fmnt\u002Fdata && mount -a` |\n| Permission denied on files | `ls -la`, check UID mapping | Match UIDs or use `all_squash,anonuid=1000,anongid=1000` |\n| Slow NFS performance | `nfsstat -c`, `mountstats \u002Fmnt\u002Fdata` | Increase rsize\u002Fwsize, add nconnect=8, tune NFS threads |\n| Autofs not mounting | `systemctl status autofs`, `automount -v` | Check \u002Fetc\u002Fauto.master syntax, verify server is reachable |\n| NFSv4 ID mapping wrong | `id username` on both sides | Ensure matching domain in `\u002Fetc\u002Fidmapd.conf` |\n| Boot hangs waiting for NFS | Check fstab options | Add `_netdev` and `bg` options to fstab entry |\n| Docker volume mount fails | `docker volume inspect`, `dmesg` | Verify NFS client packages installed on Docker host |\n\n## Related Skills\n\n- `linux-administration` -- Server setup and network configuration\n- `block-storage` -- Underlying storage for NFS server data directories\n- `performance-tuning` -- Kernel and network tuning for NFS throughput\n- `backup-recovery` -- Backing up NFS-hosted data\n- `object-storage` -- Alternative storage model for cloud-native workloads\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":26,"source":46,"license":14,"category":47,"metadata":48,"date_added":51,"description":7,"source_repo":52,"source_type":21,"compatibility":53,"license_source":54},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":49,"version":50},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-nfs-storage",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add boisenoise\u002Fskills-collections --skill nfs-storage",{"tool":67,"command":68},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill nfs-storage",{"tool":70,"command":71},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill nfs-storage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-nfs-storage\u002FSKILL.md",true,[],[76,85,93,102,110,118],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":84},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":84},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":97,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":101},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":101},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":114,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":101},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":122,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":101},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]