17 Storage
We will use Network File System (NFS) storage to share data between servers.
17.1 Configure NFS server at 194.95.75.12
sudo apt update
sudo apt install -y nfs-server
Add
/ssd *(rw,sync,no_root_squash,no_subtree_check)
to /etc/exports
.
Note
The format of /etc/exports
is
<export> <host1>(<options>) <hostN>(<options>)...
sudo systemctl enable --now nfs-server
sudo exportfs -ar
17.2 Test NFS server
From 194.95.75.12
, run
showmount -e 194.95.75.12
Export list for 194.95.75.12:
/ssd 192.168.12.8
Try to mount the NFS directory:
sudo mkdir /var/orc2_data/ssd
sudo mount -t nfs 192.168.12.8:/ssd /var/orc2_data/ssd
If successful, unmount the NFS directory:
sudo umount /var/orc2_data/ssd