You are helping the user set up NFS (Network File System) mounts to remote systems.
Guides users through setting up NFS mounts from remote servers to local systems.
/plugin marketplace add danielrosehill/linux-desktop-plugin/plugin install lan-manager@danielrosehillYou are helping the user set up NFS (Network File System) mounts to remote systems.
Check NFS client prerequisites:
dpkg -l | grep nfs-commonsudo apt update
sudo apt install nfs-common
Gather mount information from the user: Ask the user for:
192.168.1.100)/srv/nfs/share)/mnt/nfs/remote-share)Test NFS server accessibility:
ping -c 3 <remote-ip>showmount -e <remote-ip>
Create local mount point:
sudo mkdir -p <local-mount-point>
Test mount temporarily: Before making it permanent, test the mount:
sudo mount -t nfs <remote-ip>:<remote-path> <local-mount-point>
Verify the mount:
df -h | grep <local-mount-point>
ls -la <local-mount-point>
Configure mount options: Discuss common NFS mount options with the user:
rw / ro - Read-write or read-onlyhard / soft - Hard mount (recommended) or soft mountintr - Allow interruption of NFS requestsnoatime - Don't update access times (performance)vers=4 - Force NFSv4 (recommended)timeo=14 - Timeout valueretrans=3 - Number of retransmits_netdev - Required for network filesystemsnofail - Don't fail boot if mount unavailableRecommended default options:
rw,hard,intr,vers=4,_netdev,nofail
Make mount permanent via /etc/fstab:
Backup current fstab:
sudo cp /etc/fstab /etc/fstab.backup.$(date +%Y%m%d_%H%M%S)
Add entry to /etc/fstab:
<remote-ip>:<remote-path> <local-mount-point> nfs <options> 0 0
Test fstab entry without rebooting:
sudo umount <local-mount-point>
sudo mount -a
df -h | grep <local-mount-point>
Set up automount with systemd (alternative to fstab): If the user prefers automount, create systemd mount units:
Create /etc/systemd/system/mnt-nfs-remote\x2dshare.mount:
[Unit]
Description=NFS Mount for remote-share
After=network-online.target
Wants=network-online.target
[Mount]
What=<remote-ip>:<remote-path>
Where=<local-mount-point>
Type=nfs
Options=<options>
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable mnt-nfs-remote\\x2dshare.mount
sudo systemctl start mnt-nfs-remote\\x2dshare.mount
sudo systemctl status mnt-nfs-remote\\x2dshare.mount
Configure permissions: Check and configure local mount point permissions:
ls -la <local-mount-point>
If needed, adjust ownership:
sudo chown <user>:<group> <local-mount-point>
Test and verify:
touch <local-mount-point>/test-file
ls -la <local-mount-point>/test-file
Troubleshooting guidance: If issues occur, check:
ping <remote-ip>showmount -e <remote-ip>/etc/exports on server)sudo journalctl -u <mount-unit> or dmesg | grep nfsProvide best practices:
_netdev option for network mountsnofail to prevent boot issues if NFS server is down_netdev and nofail options to prevent boot issues