nfs-storage
できること
このツールは、ネットワーク越しにファイルを共有するようにコンピューターを設定するのに役立ちます。1台のコンピューターがファイルを保存する「サーバー」として動作し、他のコンピューター(「クライアント」)は、それらのファイルを自分のディスクにあるかのように利用できます。
使う場面
- ✓複数のLinuxコンピューターから同じファイルにアクセスする必要があるとき。
- ✓アプリケーションのデータやユーザーのホームディレクトリを置く、中央の保存領域を作りたいとき。
- ✓Kubernetesなどのコンテナを使ったシステムで、共有ストレージが必要なとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/nfs-storage/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“192.168.1.0/24ネットワークに対して、読み書き可能な状態で/dataフォルダを共有するNFSサーバーを設定してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
サーバーとクライアントの両方にNFSのソフトウェアをインストールします。次に、サーバー上のどのフォルダを共有するか、クライアントがどのようにアクセスできるかを設定し、権限を定義します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
NFS Storage
Configure 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.
When to Use
- Sharing directories between multiple Linux servers (web farms, build clusters)
- Providing shared storage for containerized workloads (Kubernetes ReadWriteMany)
- Centralizing home directories or application data across a fleet
- Setting up a development environment with shared project files
- Migrating from local storage to network-attached storage
Prerequisites
- NFS server:
nfs-kernel-server(Debian/Ubuntu) ornfs-utils(RHEL/CentOS) - NFS client:
nfs-common(Debian/Ubuntu) ornfs-utils(RHEL/CentOS) - Network connectivity between server and clients (TCP/UDP 2049 for NFSv4)
- Firewall rules allowing NFS traffic
- For NFSv4 Kerberos:
krb5-userand a functioning KDC
NFS Server Setup
Installation
# Debian / Ubuntu
apt update && apt install -y nfs-kernel-server
# RHEL / CentOS
dnf install -y nfs-utils
# Enable and start the NFS server
systemctl enable --now nfs-server
# Verify NFS is running
systemctl status nfs-server
rpcinfo -p | grep nfs
Export Configuration (/etc/exports)
# /etc/exports
# Syntax: <directory> <client-spec>(options)
# Share /data to a specific subnet with read-write access
/data 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash)
# Share /shared read-only to everyone
/shared *(ro,sync,no_subtree_check)
# Share /home to specific hosts
/home server01.example.com(rw,sync,no_subtree_check)
/home server02.example.com(rw,sync,no_subtree_check)
# Share /var/nfs/projects with root squash (default, map root to nobody)
/var/nfs/projects 10.0.0.0/24(rw,sync,no_subtree_check,root_squash)
# NFSv4 pseudo-root export (recommended for NFSv4)
/srv/nfs 10.0.0.0/24(rw,sync,fsid=0,crossmnt,no_subtree_check)
/srv/nfs/data 10.0.0.0/24(rw,sync,no_subtree_check,no_root_squash)
/srv/nfs/shared 10.0.0.0/24(ro,sync,no_subtree_check)
Export Options Explained
| Option | Description |
|---|---|
rw |
Read-write access |
ro |
Read-only access |
sync |
Write data to disk before replying (safe, slower) |
async |
Reply before data is written to disk (fast, risk of corruption) |
no_subtree_check |
Disable subtree checking (improves reliability) |
root_squash |
Map remote root (UID 0) to nobody (default, more secure) |
no_root_squash |
Allow remote root to act as root on the server (use cautiously) |
all_squash |
Map all remote UIDs/GIDs to nobody |
anonuid=1000 |
Map anonymous users to a specific UID |
anongid=1000 |
Map anonymous groups to a specific GID |
crossmnt |
Allow clients to traverse into sub-mounts |
fsid=0 |
Mark as the NFSv4 pseudo-root |
Applying Export Changes
# Apply changes to exports (no server restart needed)
exportfs -ra
# Show current exports
exportfs -v
# Export a new directory on the fly (temporary, not persistent)
exportfs -o rw,sync,no_subtree_check 10.0.0.0/24:/tmp/share
# Unexport a directory
exportfs -u 10.0.0.0/24:/tmp/share
Server Firewall Configuration
# UFW (Ubuntu)
ufw allow from 10.0.0.0/24 to any port nfs
ufw allow from 10.0.0.0/24 to any port 111 # rpcbind (NFSv3)
# firewalld (RHEL/CentOS)
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --reload
# NFSv4 only needs TCP 2049 (no rpcbind or mountd)
firewall-cmd --permanent --add-port=2049/tcp
firewall-cmd --reload
NFS Client Configuration
Manual Mounting
# Install NFS client
apt install -y nfs-common # Debian/Ubuntu
dnf install -y nfs-utils # RHEL/CentOS
# Discover exports from the server
showmount -e nfs-server.example.com
# Mount an NFS share manually
mkdir -p /mnt/data
mount -t nfs nfs-server.example.com:/data /mnt/data
# Mount with specific NFS version and options
mount -t nfs -o vers=4.2,tcp,hard,intr nfs-server.example.com:/data /mnt/data
# Verify the mount
mount | grep nfs
df -hT /mnt/data
# Unmount
umount /mnt/data
Persistent Mounts via /etc/fstab
# /etc/fstab entries for NFS
# Basic NFSv4 mount
nfs-server.example.com:/data /mnt/data nfs4 defaults,_netdev 0 0
# Mount with performance and reliability options
…
よくある質問
NFSとは何ですか?
Network File Systemの略で、ネットワーク越しに別のコンピューターのファイルを、自分のコンピューターにあるファイルのように利用できるようにするプロトコルです。
NFSのサーバーとクライアントの違いは何ですか?
サーバーはファイルを保存して共有するコンピューターです。クライアントは、サーバーが共有しているファイルにアクセスするコンピューターです。
フォルダを読み取り専用で共有できますか?
はい、フォルダを読み取りのみ可能に設定できます。これにより、クライアントによるファイルの変更を防げます。
詳細
作者による元の説明
Configure NFS servers and clients. Implement network file sharing for Linux systems. Use when setting up shared storage.
人気
- GitHubのスター
- 48k
- ランキング
- #5304
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。