[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PAMVWRY0WD4SCGTJ3MSVYQ":3,"skill-same:01M6PAMVWRY0WD4SCGTJ3MSVYQ":71},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":21,"commitSha":52,"skillDirectory":53,"forksCount":13,"repositoryHtmlUrl":54,"repositoryHomepageUrl":6,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":56,"install":57,"resources":70},"01M6PAMVWRY0WD4SCGTJ3MSVYQ","nfs-storage",null,"Configure NFS servers and clients. Implement network file sharing for Linux systems. Use when setting up shared storage.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fnfs-storage\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"storage","nfs","nfs storage","main","for","relevant","scripts","critical","os","platform","shared","linux","community","up","only","configure","access","devops-security","network","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\n```bash\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,no_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,no_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\n```bash\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# Mount with specific UID\u002FGID mapping (useful for containers)\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  defaults,_netdev,uid=1000,gid=1000  0  0\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` | Allow interruption of hard-mounted NFS requests |\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\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\n```bash\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,no_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,no_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\n```bash\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# Mount with specific UID\u002FGID mapping (useful for containers)\nnfs-server.example.com:\u002Fdata  \u002Fmnt\u002Fdata  nfs4  defaults,_netdev,uid=1000,gid=1000  0  0\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` | Allow interruption of hard-mounted NFS requests |\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\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":25,"source":43,"license":14,"category":44,"metadata":45,"date_added":48,"description":7,"source_repo":49,"source_type":30,"compatibility":50,"license_source":51},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":46,"version":47},"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","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fnfs-storage","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":58,"prompt":68,"zipAvailable":69},[59,62,65],{"tool":60,"command":61},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill nfs-storage",{"tool":63,"command":64},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill nfs-storage",{"tool":66,"command":67},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill nfs-storage","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fnfs-storage\u002FSKILL.md",true,[],[72,94,118,143,171,195],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":83,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[78],{"categoryNo":79,"categoryName":80,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[84,85,86,87,88,89,74,90,35,34,33,32,30,21,91,25,92,24,23,93],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","active","scope","implementing",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[101,102,103,104,105,106,107,108,109,110,111,112,113,32,114,30,115,116,25,117],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"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":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[125,126,127,128,129,130,131,132,133,134,135,136,137,30,21,138,139,140,141,142],"transcript","youtube transcript","youtube","safe","github","codex","research","license","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":160,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[149,152,155],{"categoryNo":150,"categoryName":151,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":153,"categoryName":154,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000016","图像与多媒体",{"categoryNo":156,"categoryName":157,"taxonomyType":158,"taxonomyTypeDesc":159},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[125,126,127,161,128,162,129,130,132,163,164,165,166,135,167,30,21,168,169,170],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":172,"name":173,"nameZh":6,"description":174,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":175,"categories":176,"keywords":181,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[177,180],{"categoryNo":178,"categoryName":179,"taxonomyType":81,"taxonomyTypeDesc":82},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":153,"categoryName":154,"taxonomyType":81,"taxonomyTypeDesc":82},[127,182,183,105,128,184,185,186,187,132,165,188,189,190,191,21,192,138,193,194],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":202,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[201],{"categoryNo":150,"categoryName":151,"taxonomyType":81,"taxonomyTypeDesc":82},[203,127,204,205,128,162,163,206,207,164,165,166,135,208,167,30,21,168,209,141],"youtube full","full","google","server","dlp","credits","automatic"]