Install

apt-get install -y nfs-kernel-server
mkdir -p /data/nfs
chmod -R a+w /data/nfs

cat >> /etc/exports <<EOF
/data/nfs 10.0.2.21(rw,sync,no_subtree_check) 10.0.2.22(rw,sync,no_subtree_check)
EOF

systemctl enable nfs-server
systemctl start nfs-server

在 client 上安装

apt-get install -y nfs-common
mkdir /nfs
mount -t nfs 10.0.2.21:/data/nfs ./nfs
unmount ./nfs