D. Create the entries to mount the NAS shares at their target locations.
Each nas vendor has a different pathname conventions. Please follow the documentation for your NAS.
In this example, Synology’s and QNAP’s conventions will be shown.
The photos library will be mounted Read-only to prevent accidental deletion by anyone.
The example systems are a twin volume Synology DiskStation and a single volume QNAP system
You will notice the two nas units are seamlessly blended together here. In the end, Plex will complete the blending into a single library if so desired.
/etc/fstab has the following entries added to it. These will require testing and possible adjustment for your NAS and configuration. NFS is shown here first.
if you have defined the hosts syno and qnap in /etc/hosts, you may use their names here otherwise use their IP addresses.
You may always use hostname or IP address interchangeably as long as there is a definitive resolution.
Copy to clipboard
//syno/volume1/movies /nas/movies cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//qnap/share/movies2 /nas/movies2 cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//syno/volume1/children /nas/children cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//syno/volume2/tv /nas/tv cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
//qnap/share/cartoons /nas/cartoons cifs auto,defaults,nofail,credentials=/etc/plex.cred,uid=plex 0 0
# Two NFS examples in to the same NAS units
# QNAP is .21
192.168.0.21:/share/Photos /nas/photos nfs auto,defaults,nofail,ro 0 0
# Syno is .23
192.168.0.23:/volume2/music /nas/music nfs auto,defaults,nofail 0 0
Save the file and now we begin testing.
E. Begin verifying and testing the new mount points
Copy to clipboard
sudo sh
mount -avt cifs # each will attempt to mount and give dialog as it does. Look for "successfully mounted"
# follow up by seeing what actually is mounted
df
# check to see if you have visibility into each share
cd /nas
ls * # This will list all the top level output from each share and will be voluminous so be prepared
If you have made any errors, you may work at the individual mount level
Copy to clipboard
sudo sh
mount /nas/movies
ls /nas/movies
# Um, that didn't work right... Change mount in /etc/fstab
umount /nas/movies
# After editing, try it again
mount /nas/movies
Repeat the above until you’re happy with all
There is one final step which will often help avoid permission issues on Linux systems (should the NAS be very security conscious)
This sets the permissions of the directories after they have been mounted too, effectively tweaking the NAS permissions a bit looser (read-only)
Copy to clipboard
sudo chmod 755 /nas/*
All your network (NAS) media is now available to PMS starting with the /nas folder at the top.
For additional information and available options for CIFS/SMB mounts, type man mount.cifs in a terminal window