How to index media on a NAS drive

Post Reply
bizmodeller
Posts: 456
Joined: Thu Nov 14, 2013 8:40 pm

How to index media on a NAS drive

Post by bizmodeller »

This how-to explains how to index media that is stored on a NAS drive.

First - if your NAS supports Docker (http://www.docker.com) containers then you can now install My Media directly on the NAS device itself - see our instructions here - https://www.mymediaalexa.com/home/docker. To find out whether your NAS supports Docker check with your NAS supplier; for example for Synology NAS's - see here: https://www.synology.com/en-us/dsm/packages/Docker

If your NAS doesn't support Docker then you'll need to install My Media on another computer - either a Windows, Mac OS, Linux or Raspberry Pi system. If you don't have a computer you want to leave on 24/7 then we recommend buying a cheap low power $30 raspberry pi and installing it on that. We won't cover the installation steps here -have a look on our main website https://www.mymediaalexa.com for steps and installation videos per platform.

Once installed, you can easily index your own local media stored on the same computer. However, if you want to index media stored on a NAS you may need to do some additional steps depending on your operating system.

Windows

Windows users typically create mapped network drives that let them access NAS content using a traditional drive letter, eg the z:. My Media for Alexa runs as a Windows Service not as the usual user account that logs into the computer's desktop. This means that any mapped network drives that have already been set up will not be visible to My Media for Alexa - it's running in a completely different context to your desktop account. Instead, you need to tell My Media about the mapping so that it can recreate it within its own context.

To do this, go to the Settings tab of the My Media Web Console, click 'Mapped Drives', and then click 'Add Network Drive' . Enter the drive letter, path and a username / password that has access to the NAS. Remember the path should look like \\nasname\path (eg \\192.168.0.20\Media) not just the server's IP address. Some Windows machines (particularly after one of the most recent Windows updates) don't like connecting to shares anonymously - in this case you may get an error message indicating 'The specified server cannot perform the requested operation'. If you get this, try creating a local account on your NAS with its own password and entering these credentials into the username/password settings of the My Media Add Network Drive window.

Linux/Raspberry Pi Systems

Linux based systems use a mount based system where external NAS's can be mounted to paths within the file system. There are lots of different ways of accomplishing this (just google 'mount nas on linux', but the method we use is to edit the /etc/fstab file and add a line with the following:

Code: Select all

//192.168.1.18/Public /home/pi/nas cifs x-systemd.automount,password=,users,auto,user_xattr 0 0
... where 192.168.1.18 is the name or static IP of the NAS and /Public is the folder to mount. This will present the mount as /home/pi/nas and automount it when the system boots. This works for a NAS share that has no password.

... or ....

Code: Select all

//192.168.1.18/Public /home/pi/nas cifs x-systemd.automount,username=testuser,password=mypassword,users,auto,user_xattr 0 0
.... to do as similar thing but authenticating with the username testuser and password mypassword. Note this isn't secure as the password can be read by any users on the system. If you need to protect the password, follow the instructions in https://wiki.ubuntu.com/MountWindowsSharesPermanently to store credentials in a credentials file instead.

After editing /etc/fstab, run this command:

Code: Select all

sudo mount -a
... to refresh your mounts.
Post Reply