Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)48k · #5304

nfs-storage

Fungsinya

Tool ini membantu mengatur komputer agar bisa berbagi file melalui jaringan. Satu komputer berperan sebagai 'server' yang menyimpan file, dan komputer lain ('client') bisa mengakses file tersebut seolah-olah ada di disk mereka sendiri.

Kapan dipakai

  • ✓Saat Anda membutuhkan beberapa komputer Linux untuk mengakses file yang sama.
  • ✓Untuk membuat ruang penyimpanan terpusat untuk data aplikasi atau direktori home pengguna.
  • ✓Saat mengatur sistem berbasis container (seperti Kubernetes) yang membutuhkan penyimpanan bersama.

Link skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/nfs-storage/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/nfs-storage/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Atur server NFS untuk membagikan folder /data dengan akses baca-tulis untuk jaringan 192.168.1.0/24.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Anda menginstal software NFS di server dan client. Kemudian, Anda mengonfigurasi folder mana di server yang akan dibagikan dan bagaimana client bisa mengaksesnya, sekaligus menentukan izin aksesnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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) or nfs-utils (RHEL/CentOS)
  • NFS client: nfs-common (Debian/Ubuntu) or nfs-utils (RHEL/CentOS)
  • Network connectivity between server and clients (TCP/UDP 2049 for NFSv4)
  • Firewall rules allowing NFS traffic
  • For NFSv4 Kerberos: krb5-user and 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

…
Pertanyaan umum

Apa itu NFS?

NFS adalah singkatan dari Network File System. Ini adalah protokol yang memungkinkan satu komputer mengakses file di komputer lain melalui jaringan seolah-olah file itu ada di komputer sendiri.

Apa perbedaan antara server dan client NFS?

Server adalah komputer yang menyimpan dan membagikan file. Client adalah komputer yang mengakses file yang dibagikan oleh server.

Bisakah saya membagikan folder hanya untuk akses baca?

Ya, Anda bisa mengatur folder agar hanya bisa dibaca, sehingga file tidak bisa diubah oleh client.

Detail

Deskripsi asli dari pembuat

Configure NFS servers and clients. Implement network file sharing for Linux systems. Use when setting up shared storage.

repo: sickn33/agentic-awesome-skills

Popularitas

Bintang GitHub
48k
Peringkat
#5304
Lisensi
MIT
Diperbarui
15/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa