NASMount TAP

The original description and download is available from Gerti's site

nasmount1.jpg

Overview

This TAP mounts a NAS (Network Attached Storage) via NFS on the SRP.

It will mount up to four directories (one for Videos, one for Pictures, one for MP3 and one for Recording) from the NAS to the local Folders on the PVR.

To mount your NAS onto the PVR, you have to edit the file NASMount.ini which is located at ProgramFiles/Settings/NASMount.

To wake up the Server by WOL (Wake on LAN), the MAC-Address of the NAS has to be entered also into the ini File

The TAP can be placed within the AutoStart Folder and checks automatically if the Server is online. As soon as the Server is available, a Logo with the number of mounted devices will be displayed.
If the Server is not available within two minutes after starting the TAP, you will also see a Logo about the status and the TAP will stop trying any longer to access the Server.

For use with a Windows PC, instead of a dedicated NAS, there's FreeNFS.

Here: http://freenfs.sourceforge.net/

There's a couple of commercial/shareware programs too.

When using a WinPC it's possible to use links to directories, so the files don't physically have to be in the shared folders. I use Link Shell Extension to create them.

Info & D/L here: http://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/

Configuration

The NASMount.ini contains the following lines:

NAS IP-Address

Here you have to enter the IP-Address of the NAS-Server.

NAS MAC-Address

If you enter the MAC-Address of the NAS-Server, a continously WOL-Command will be send to the Server.

NAS Boottime [0-600 seconds]

With Automount=1 you can define how long the TAP will wait after a successful PING, before it mounts the Server.
With Automount=0 you can define the time the NAS needs to wake up after the first WOL Command.

Local Folder Name

Name for the local folder where the files will be mounted to. This folder will be deleted automatically after shutting down the PVR.

Remotefolder MediaFiles

Path to the Mediafiles on the NAS-Server. Leave this entry empty if there is no kind of folder on the NAS-Server.

Remotefolder MP3Files

Path to the MP3-Files on the NAS-Server.
Leave this entry empty if there is no kind of folder on the NAS-Server.

Remotefolder PhotoFiles

Path to the Photosfiles on the NAS-Server. Leave this entry empty if there is no kind of folder on the NAS-Server.

Remotefolder DataFiles

Path to the Recordings on the NAS-Server. Leave this entry empty if there is no kind of folder on the NAS-Server.

Mountoptions

Here you can enter additional mount options, which are used for all mount points. Leave this entry empty if you didn't need any additional mount options.

NAS Recording [0=OFF / 1=ON]

Mounts the DataFiles-Folder of the first NAS as Recordingdevice

MountDelay [0-600 seconds]

Seconds the TAP waits before it tries first time to mount the NAS or send the WOL

Timerdelay [0=OFF / 1=ON]

Delay for timers, starting within on minute after start of the TAP. Only active, if also NAS Recording is enabled.

Automount [0=OFF / 1=ON]

Performs an automatic Mount / Unmount if the NAS server is online / offline. If Automount=0 is set, it will try to mount the NAS without checking if it is online and unmount it only if the TAP is stopped.

PingWait [3-10 seconds]

Time in seconds how long the TAP is waiting for an answer of the PING command.

PingGap [30-300 seconds]

Gap in seconds between the PING commands.

Resoving Issues

Stuttering Playback

Try using the following option:
Mountoptions=-osoft,intr,tcp,rsize=65535

Can't see NAS Folders

Usually a permissions issue. Ensure that TAP is started and it has displayed the logo with a number that corresponds to the number of mount points. Then ensure that permissions on the NAS are set so that "guest" type access is allowed.

Other Tips

(courtesy of user SunHillCopper from Whirlpool forum)

I found the TMSTelnetd TAP listed on the site very helpful in trying to work out why the NASMount TAP didn’t work for me initially, (and I think I made every combination of mistakes possible … I'm patient!)

When you start the NASMount tap you should in each of the Toppy folders you defined a path for a NAS-Share folder in them. If you don’t then you probably got the NAS mount logo with red crosses in it. So Telnet in and type the “Mount” command and see how many NFS type mounts you see. For each missing mount it could be

  • Something may be wrong with you NAS setup. Did you export the folders? (“exportfs –ra” is the command I forgot to use on my Ubuntu NFS server first time around). Try connecting from another NFS client to those exported folders. (NFS client support is an option in Windows 7 and Server 2008, it’s not there by default but can be enabled)
  • Or Something may be wrong with the paths you have in the INI file that point to the NFS folder you are using. For example I had a DataFiles folder on my NAS but I had typed in DataFile in the path …
  • If you have a mount for each folder but they are not showing in the UI on the toppy then check the listing for the folder. For example type ls –l /mnt/hd/DataFiles and see who the group owner is. It should be “root”. If it’s not (for example I originally had “nfsnobody”) then the Toppy doesn’t display it. Change the group owner to “root” on your NFS Server and whilst you are there check the permissions are rw for owner, group and others.
  • If that works and you see the NFS-Share in the UI on the Toppy then go in to that folder and create a new sub folder. Does it create a folder you can see in the UI called GROUP 01? If not then check via telnet what you see in /mnt/hd/DataFiles/NAS-Share. I couldn’t see the folder in the UI but it was showing in the NAS-Share folder on telnet, but the group owner was “nfsnobody”, not root. This is when I had to add the no_root_squash option to the /etc/exports on my NFS server. I removed the folder and tried again. This time I could see the GROUP 01 folder in the UI and it was showing a group owner of root via telnet. I didn’t have any security concerns about using that option on my NFS server as it only exposes folders to my internal network.

The next issue I ran in to was copying file to the NAS-Share and playing files from the NAS-Share. Copying via the UI didn’t work, but copying with Telnet using cp or mv did, and the backgroundcopy TAP worked.

I found playing files from the NAS-Share would stutter or come up with scrambled service. Using Mountoptions=-osoft,intr,tcp,rsize=65535 fixed it.

Examples:

NAS IP-Address=192.168.2.200
NAS MAC-Address=FA:7C:CB:16:77:A0
NAS Boottime=60
Local Folder Name=NAS-Share
Remotefolder MediaFiles=/mnt/Files/MediaFiles
Remotefolder MP3Files=/mnt/Files/MP3Files
Remotefolder PhotoFiles=/mnt/Files/PhotoFiles
Remotefolder DataFiles=/mnt/Files/DataFiles
Mountoptions=-osoft,intr,tcp,rsize=65535
NAS Recording=0
MountDelay=30
Timerdelay=0
Automount=1
Ping Wait=3
Ping Gap=30

You can mount up to three NAS-Servers with this TAP. For further NAS-Server you can add following entries into the INI-File:

2nd NAS IP-Address, 3rd NAS IP-Address
2nd NAS MAC-Address, 3rd NAS MAC-Address
2nd Local Folder Name, 3rd Local Folder Name
2nd Remotefolder MediaFiles, 3rd Remotefolder MediaFiles
2nd Remotefolder MP3Files, 3rd Remotefolder MP3Files
2nd Remotefolder PhotoFiles, 3rd Remotefolder PhotoFiles
2nd Remotefolder DataFiles, 3rd Remotefolder DataFiles
2nd Mountoptions, 3rd Mountoptions
2nd NAS Boottime, 3rd NAS Boottime

Update with V3.1:

In total you can mount up to ten NAS-Servers.
For each additional NAS-Server you have to make new INIs (2.ini until 10.ini).
They have same entries like the NASMount.ini, except of:
NAS Recording
Timerdelay
MountDelay
SilentMode
Logfile

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License