This is a post to help me remember how to do this as I will probably forget by the time I need to do this again.

I have a NAS (Buffalo 2TB) on which I keep my music, movies and other media ripped from CD, DVD or bought online** so as to be able to access it from which ever of the 3 computers (Desktop, Laptop and Raspberry Pi) in the house I am using.

The issue I was having is that Plex doesn't work with the share on the NAS directly, on Windows it is fairly easy to fix you just map the drive to folder(s) required, for instance on my Windows install I have the movies(films) mapped to the F drive, my music (MP3) mapped to the M drive and the TV shows mapped to the T drive.

On my Linux installs which I use more than the Windows install I was having the issue that Plex would only see local files on the PC not the NAS files.

To map the drive on Linux you use the mount command to "attach" the NAS shares to a folder/location on the local PC.

First create a folder to mount the share to:

As root (or use sudo)

mkdir /mnt/nas

This creates the folder/location nas under the mnt directory

The mount command can be tested using the command line

mount -t cifs //ip-address-of-nas/share /mnt/nas -o username=nobody

This should mount the NAS share to /mnt/nas and if you go to /mnt/nas you should be able to see the folders/files there now.

Now it is a bit of a pain to remember to do this all the time so you can automate it by adding an entry to the fstab file (/etc/fstab), this file mounts all the relevant filesystems on boot.

Rather than put username and password details directly in fstab it is a good idea to put these into another file so you can change permissions to restrict who can view the details.

Create a file anywhere you like, I put it in /etc and call it what you like i.e nasdetails. To create file

touch /etc/nasdetails

Edit the file

nano /etc/nasdetails

The file should contain two lines



Obviously change PASSWORD to your nas password then save file and change permissions so only root can read

chmod 400 /etc/nasdetails

now you can edit the fstab file

nano /etc/fstab

Add the following to it

//ip-of-nas/share /mnt/nas cifs uid=1000,gid=1000,credentials=/etc/nasdetails  0 0

Save file.

you can reload the fstab using

mount -a

You should now be able to browse to /mnt/nas and see the files on the nas as if they were local.

You can now add any media folders to Plex*.

* Will probably help with other programs as well.

**Don't pirate stuff folks ;)