Unable to successfully mount a share from Diskstation NAS
-
@pyr0cide I have a DS414 running DSM 6.1.6-15266. I have not tried to mount via scripts at startup, but I have always used Kodi on the Pi, including my current install of Kodi via RetroPie to mount and playback media from the DS without any problems at all. Perhaps you have done the same.
So, that said, there must be a way to make the same connection outside of Kodi at the CLI.
I don't have direct answers, but I am curious to find out how this discussion evolves and I can maybe do a few tests.
-
@caver01 If i was using it for media playback that would be fine and most likely would be doing similar application of mounting through Kodi. However, the only use for this pi is for retro gaming and nothing else. I have not tried mounting through kodi and pointing the roms location in the es_systems.cfg to the kodi mount point though. Might give that a go later.
I can ping the IP address no problems, but something in the syntax of auto mounting is bad and I am at a loss as to what it would be.
-
@pyr0cide Understood. I was merely adding that the connection is definitely possible.
-
You might want to check the man page on mount for both smb and nfs methods, they are fundamentally different. From the line above I can't tell if you are trying to mount the CIFS or NFS share. NFS doesn't use username/passwd and is generally controlled by the server via IP/hostname. Also the mount option for nfs is "-t nfs". For NFS you would use something like this:
mount -t nfs 192.168.1.6:/Games/Emulator_ROMS /home/pi/RetroPie/roms
Some linux distros get confused if NFSv4 if not set up properly, so I would suggest adding to the above "-o vers=3" to force NFSv3.
CIFS is completely different.
I hope that helps.
-
Ok, I updated the autostart.sh to this
#auto mount NFS share
mount -t nfs -o vers=3 192.168.1.6:/volume1/ROMS /home/pi/RetroPie/romsRestarted to nothing mounted. Tried mounting manually using the same command and got access denied by server while mounting. Logged into the NAS and ran exportfs -a, restarted NAS and Rpi to the same thing access denied message.
-
@pyr0cide Are you sure you configured the NFS server correctly ? Also, shouldn't you run the
mount
command prefixed withsudo
? -
I just recreated the test NFS share on my nas thinking something wasnt configured correctly. Same thing.
And yes, the command was run with sudo when done manually. I just didnt have that included in the last comment. The autostart.sh does not need sudo prefixed.
-
@pyr0cide Can you post the logs from the server (the
dmesg
portion of the mount error) and client when you run the mount operation ? -
This is the only thing that shows up mount via dmesg
pi@retropie:~ $ dmesg | grep "mount"
[ 1.022428] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.023426] devtmpfs: mounted
[ 2.410068] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ 3.134143] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)Is this what you were requesting?
And the manual mount error
pi@retropie:~ $ sudo mount -t nfs -o vers=3 192.168.1.6:/volume1/ROMS /home/pi/RetroPie/roms
mount.nfs: access denied by server while mounting 192.168.1.6:/volume1/ROMSNFS share on NAS
pyr0cide@Home-NAS:/$ sudo cat /etc/exports
/volume1/roms 192.168.1.*(rw,async,no_wdelay,no_root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)EDIT: Keep in mind, I don't really care HOW it is mounted, but I don't have a SD card large enough for all the roms and since I have a near infinite storage capacity on my NAS I would much rather have it mounted in whatever way I can get at this point. But I understood that NFS is faster than SMB and CIFS which is why I wanted to try it that way first.
-
@pyr0cide Just leave the exports on the server
/volume1/roms 192.168.1.*(rw,async,no_wdelay,no_root_squash)
And make sure you use the proper case when referring to the share name, i.e. not mixing upper-case with lower-case
mount -t nfs -o vers=3 192.168.1.6:/volume1/roms /home/pi/RetroPie/roms
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.