How to share hard drive with another computer with NFS?

Open in a file manager perhaps on /run/media/$USER/… ?

I have only a pdf opened from that drive as far as I’m aware.

If you have anything opened located on the device you will get error mounting it using the unit.

Eject it using the file manager eject button.

Then retry the unit.

Oh I was actually creating a new mount point for the drive and had to unmount it. Now it worked.

Now I’ve done:

server ❯ mkdir -p /srv/nfs/R
server ❯ sudo nvim /etc/fstab
/r/ntfs /srv/nfs/R none bind 0 0
client ❯ sudo mkdir -p /data/nfs
client ❯ sudo cat /etc/systemd/system/data-nfs-R.mount
[Unit]
Description=R drive
After=network.target

[Mount]
What=192.168.1.122:/r/ntfs
Where=/data/nfs/R
Type=nfs
Options=_netdev,auto

[Install]
WantedBy=multi-user.target
client ❯ sudo systemctl restart data-nfs-R.mount
Warning: The unit file, source configuration file or drop-ins of data-nfs-R.mount changed on disk. Run 'systemctl daemon-reload' to reload units.
Job failed. See "journalctl -xe" for details.
client ❯ systemctl daemon-reload
client ❯ sudo cat /etc/systemd/system/data-nfs-R.automount
[Unit]
Description=Automount R drive share
ConditionPathExists=/data/nfs/R

[Automount]
Where=/data/nfs/R
TimeoutIdleSec=10

[Install]
WantedBy=multi-user.target
client ❯ sudo systemctl enable data-nfs-R.automount
client ❯ ls /data/nfs/R
ls: cannot access '/data/nfs/R': No such file or directory

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.