Mount a network drive (Linux NFS)
Introduction
This is a short manual on mounting network storage on Linux using NFS.
This guide assumed that you have established a connection to my network; see Connecting to my network if you haven't already.
Before we begin..
I SHALL NOT BE LIABLE FOR ANY DAMAGES OR LOSSES ARISING FROM ANY USE OF THE NETWORK SHARE, INCLUDING ANY INTERRUPTIONS TO THE NETWORK SHARE, INCLUDING, BUT NOT LIMITED TO, ANY POWER OUTAGES, SYSTEM FAILURES, NETWORK ATTACKS, SCHEDULED OR UNSCHEDULED MAINTENANCE, OR OTHER INTERRUPTIONS.
YOU are responsible for keeping enough backups of your data.
Recommended reading: https://www.backblaze.com/blog/the-3-2-1-backup-strategy/
With that out of the way, let's begin!
Installing dependencies
We need NFS client tools to mount a drive.
On Debian
sudo apt install nfs-common
On Arch Linux
sudo pacman -S nfs-utils
Mount a volume
I have a separate domain used for resolving machines and services on my homelab.
Take the following script and fill it out with your parameters.
#!/bin/bash
POOL=alpha # Leave as-is unless told otherwise.
SHARE=joris # <-- Put your name here, in lower case.
MOUNT=/mnt # <-- Write where you want to mount it.
sudo mount truenas.storage.jorislab.nl:/mnt/$POOL/$SHARE $MOUNT
And we're done! Enjoy!