I have multiple drives in a computer and I would like to share all of them at once instead of sharing each one as described in this tutorial. Is that possible?
For example instead of sharing the drive
/mnt/hdd1, could I share all drives mounted in
Yes, you can. See the Arch Wiki page on NFS.
I’ve modified this commands that did work before, to share
/mnt/ instead of
It didn’t work.
$c: client, $s: server
$s sudo chmod 777 /mnt
$s sudo vi /etc/exports
$s sudo exportfs -arv
$s sudo systemctl enable --now nfs-server.service
$c sudo systemctl enable --now nfs-client.target
$c showmount -e 192.168.1.45
Export list for 192.168.1.45:
$c sudo mkdir -p /srv/nfs/lenovo
$c sudo chmod 755 /srv/nfs/lenovo
$c sudo cat /etc/fstab
192.168.1.45:/mnt /srv/nfs/lenovo nfs auto,x-systemd.automount,x-systemd.device-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0
$c sudo systemctl daemon-reload
$c sudo mount -a
$c ls -l /srv/nfs/lenovo
drwxr-xr-x 2 root root 4096 sep 24 12:57 hdd1
drwxrwxrwx 2 root root 4096 ago 28 17:19 v
$c ls -l /srv/nfs/lenovo/hdd1
The drive isn’t empty.
Thanks, I changed the
/etc/exports in the server to:
and now it works.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.