fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:nfs

NFS

Server

Installation

sudo apt update
sudo apt install rpcbind nfs-kernel-server

Konfiguration

Shares und Berechtigungen

sudo mkdir /mnt/net-vol01
chmod -R 755 /mnt/net-vol01
sudo nano /etc/exports

Zeile hinzufügen:

/mnt/net-vol01    10.1.1.0/24(rw,sync,no_root_squash,no_subtree_check)

Anschließend exportieren:

sudo exportfs -ra

Firewall

Ports für Client freigeben:

sudo ufw allow in on ens10 from 10.1.1.1/32 to any port 111
sudo ufw allow in on ens10 from 10.1.1.1/32 to any port 2049
sudo ufw reload

Steuern

sudo exportfs -ra
sudo systemctl restart nfs-server
sudo systemctl status nfs-server
sudo systemctl restart portmap
sudo systemctl status portmap

Client

Installation

sudo apt update
sudo apt install nfs-common

Konfiguration

sudo mkdir /mnt/net-vol01
sudo mount -t nfs4 10.1.1.2:/mnt/net-vol01/ /mnt/net-vol01/
umount /mnt/net-vol01/

Dauerhaft mounten über fstab:

sudo nano /etc/fstab

Zeile hinzufügen:

10.1.1.2:/mnt/net-vol01	/mnt/net-vol01	nfs4	defaults,user,exec	0 0
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.  More information about cookies 
linux/nfs.txt · Last modified: 2024/02/17 19:03 by 127.0.0.1