jdesive / setup.md
Mount Synology NFS share to Ubuntu 16.04
I have all hardware virtualized in ESXi 6.5.
Synology DSM 5.2-5644
Ubuntu 16.04
On your fresh install on Ubuntu 16.04:
- Click the Connections icon on the top bar
- Goto Edit Connections
- Find your connection and click Edit
- Goto IPv4 Settings and change it from DHCP to Manual
- Click the Add button and add a free static IP address
- Then click Save and reboot
On the Synology box
- Goto Control Panel
- Click Shared Folder and find your share you want to mount
- Click Edit
- Goto NFS Permissions
- Click create and add your static IP from the Ubuntu box and the desired permissions
Make sure to note the Mount path from the bottom of the window
- Open Terminal and type sudo apt-get install nfs-common -y
- Then make the dir you want to mount to with sudo mkdir /mnt/media — replace /mnt/media with whatever you want
- Then type sudo gedit /etc/fstab
- On the bottom of the page add this line, replacing the require parts with what yours is
Where 192.168.1.120 is the static IP of the Synology box
and /volume2/Media is your mount path you noted earlier
and /mnt/media is the folder you created in step 2
- Save and then type sudo mount -a in the terminal or reboot.
Navigate to the folder you created in Step 2 and your files should be there.
Linux Mint Forums
Welcome to the Linux Mint forums!
[SOLVED] Mount Synology NAS Shared Folder
[SOLVED] Mount Synology NAS Shared Folder
Post by garrett69 » Sat Feb 09, 2019 5:41 pm
I’ve been able to access my shared folder in the file manager on Linux Mint 19. After many hours of research, I’m having issues getting that folder and/or my Synology NAS to mount on boot. I can access the drive using afp or smb, and it will auto login using the file manager, but no luck on boot. I’ve tried several options in editing the /etc/fstab file with no success. The main issue is I store music on this shared drive, and every music player I’ve tried can access and play the files fine, until reboot. Then it all has to load again. Any help would be greatly appreciated!
Re: Mount Synology NAS Shared Folder
Post by AndyMH » Sat Feb 09, 2019 8:23 pm
Re: Mount Synology NAS Shared Folder
Post by garrett69 » Sat Feb 09, 2019 11:05 pm
Thanks for the quick reply. I created the .txt file, and added your command to fstab. I rebooted and now see a mounted drive, but upon clicking on it, I get the following error: Unable to mount xx: mount:/media/XX: operation permitted only for root.
Any ideas what I did wrong? Could 2 factor authentication be an issue? Thanks for your quick response, time, and patience with someone new!
Re: Mount Synology NAS Shared Folder
Post by AndyMH » Sun Feb 10, 2019 6:45 am
Re: Mount Synology NAS Shared Folder
Post by garrett69 » Sun Feb 10, 2019 1:09 pm
Yes, I’m running LM19 cinnamon. I do see it in nemo — it shows as a drive. If I click it, I get the pop-up box with :Unable to mount xx: mount:/media/XX: operation permitted only for root.»
I have the NAS set for afp & smb (3 & 1 like you have). I can use nemo to click Network with globe icon, and then double click the drive and it will load and I can use it (It shows it’s using afp? and has filesharing under the folder). And the 2fa wasn’t an issue here. The issue is the drive not mounting on boot (At least from what I’ve read, that’s why Rhythmbox is losing my song list and must reload each boot).
I created the .txt file and placed in the same path you had listed. Did I possibly miss doing something there?
Re: Mount Synology NAS Shared Folder
Post by AndyMH » Sun Feb 10, 2019 2:20 pm
Try turning 2FA off and see what happens.
You could also try username and password explicitly in fstab instead of the credentials file to eliminate that as a source of error, e.g.
Re: Mount Synology NAS Shared Folder
Post by garrett69 » Sun Feb 10, 2019 3:49 pm
It mounted. I changed fstab and entered the username and password in fstab and it worked. I’d still prefer to create a credentials file. I did this before by using gedit /path/to/file and enter and save:
I added the credentials=/path/to/credentials to fstab before. Is there anything I might be missing.
Thank you so much for your responses and help. I’m at 8+ hours working on this!
Re: Mount Synology NAS Shared Folder
Post by AndyMH » Sun Feb 10, 2019 6:37 pm
Re: Mount Synology NAS Shared Folder
Post by garrett69 » Sun Feb 10, 2019 7:58 pm
Re: Mount Synology NAS Shared Folder
Post by AndyMH » Mon Feb 11, 2019 4:11 am
Amigo’s Technical Notes
Keep notes of my experience and share with everybody
Using NFS to Share Files on Synology Between OS X and Linux
I choose to use Network File System aka NFS to share files between OS X and Linux because it’s much faster than Samba. But there is one more thing I need to handle: file and folder permissions.
Allow Connection to NAS
DSM on Synology is a graphical web interface for easier management.
First, you need to add IP address in NFS Privileges list in [Control Panel] → [File Sharing and Privileges] → [Shared Folder] and allow for read / write. You may use IP with Netmask to specific range with the same permission. Thanks for correction by Li-chih Wu in Facebook Group: QNAP Geek.
For example, if you want all IP between 192.168.1.1 to 192.168.1.254 with the same permission, use 192.168.1.1/24. Another is all IP between 192.168.1.5 to 192.168.1.6 with the same permission, use 192.168.1.5/29. Netmask on Computer Hope is a very detail explain and IP Calculator by Krischan Jodies may calculate for you.
You also need to enable [Allow connections from non-priviledged ports (ports higher than 1024)] for OS X.
At first, I leave Root squash as default No mapping. But I notice folder owner created on Linux and OS X are different, files created on one cannot be edit or delete by another.
File Permission and Squash Option
Because I want to have full access on files and folders on Synology, I have to edit /etc/exports and change no_root_squash into all_squash.
Use exportfs -ra to reload export configuration or use /usr/syno/etc/rc.d/S83nfsd.sh restart to restart NFS service. Please refer to Fix NFS privileges on Synology NAS on Linux and Unit tips and Basic commands to get around the Synology Box using the CLI: nfs on Synology for more detail.
In export, anonuid=1025 will be map as guest while anonuid=1024 is admin.
Stop Generating @eaDir
When I am copying files, it seems @eaDir will stop from copying due to permission as discussed in eaDir directories causing problems on Synology forum. Therefore, I follow Getting rid of the @eaDir folders on Synology NAS DSM on MikeBeach.org to delete them all.
Because I don’t need its Media Indexing Services, I also follow Disable indexing and generation of @eaDir directories on Synology NAS on MikeBeach.org to disable it.
Notes
This post only apply to DSM on Synology. QTS on QNAP is even easier. Please refer to Using NFS to Share Files on QNAP Between OS X and Linux. If you are using OS X as your NFS server, please refer to EXPORTS(5) on OS X Man Pages.
Mount CIFS/NFS (Synology)
#1 zendagi
how can i mount my network hard drive (synology) on my dm800se using cifs or nfs protocol.
i cant find any tool on my box how allowed me to do this.
Re: Mount CIFS/NFS (Synology) #2 Meega
ET10000+ Openpli 6.1,1m schotel 4x duo-lnb op vaste opstelling.
Momolights teensy 2.0 met 50 leds op een string ,150 channels
DM8000 Openpli 6.1 Release
Re: Mount CIFS/NFS (Synology) #3 zendagi
but i edited the fstab and it works finnaly.
Re: Mount CIFS/NFS (Synology) #4 EnoSat
Re: Mount CIFS/NFS (Synology) #5 ims
for synology NAS is better to use autofs/autofs4. I am using it half year on OpenPli4 (VU,XP1000) and OpenPLi3 (DM800SE) and from this time my 3 synology boxes can sleep disks well. Here is example for sharing between boxes. But for NAS it is similar.
When is shared server down, box do not wait long time for connecting.
opkg install autofs
opkg install autofs4
1)edit /etc/auto.master … modify or add lines:
for box using OpenPli3:
for box using OpenPli:
/mnt/dirname /etc/auto.xxx —ghost
2)create /etc/auto.xxx file(s), where xxx is used name in auto.master (f.eg. auto.xp)
3)fill content of auto.xxx files (there can be more records in one file):
folder -fstype=cifs,username=user,password=passwd,noatime,noserverino,iocharset=utf8,sec=ntlmv2 ://serverip/sharedname
4) restart box — you will see shared folder there in: /media/dirname/folder
Example:
/mnt/xp1000 /etc/auto.xp
then create auto.xp file and write:
harddisk -fstype=cifs,username=root,password=dreambox,noatime,noserverino,iocharset=utf8,sec=ntlm ://192.168.1.20/hdd
shared disk from xp1000 will be visible as:
/media/xp1000/harddisk
Note: on XP1000 must exist shared folder in smb.conf as [hdd]
note:
Re: Mount CIFS/NFS (Synology) #6 gorski
From my «PBNIGMA guide» for those who might need it:
The sign is the result of copying -> sign from a pdf file. So, it directs you to the next step.
From NAS to MMC
1) On Synology DS210j [my cool Linux-based, really well sorted NAS], I created shared folders [video, music, photo].
2) Then, I activated the NFS sharing protocol in DS210j settings [Linux streaming protocol, as opposed to Windows, CIFS].
3) In the NAS I also created a user I called Ferrari [including the password]. Otherwise, all else is done from the main admin account, with its password. One needs to give rights to the Ferrari user [Write and/or just Read, according to what your needs are].
4) Each Shared Folder must be edited for -> NFS Privileges. Here, I gave them to my F500HD, in the form of its IP address [192.168.x.x].
Even though I have an account with username/password to log in – those aren’t necessary!
The Shared Folders, once again, are video, music, and photo.
Mounting shared folders in MMC using NB/MM plugins
There are two ways of mounting shared folders from “networked devices” ([W]LAN) to your MMC/F500 HD:
1) Using NetworkBrowser/MountManager plugins or
2) Using fstab editing.
For the former: press the MENU on RCU to get to the Main Menu Setup System Network NetworkBrowser. Don’t worry, I will repeat some stuff from above but it’ll make it
easier on you, so you don’t have to go back to find the relevant parts of the “guide”…
Make sure all your multimedia devices are turned on.
The plugin scans your Home Network and gives you what it finds in the list.
Choose your (Linux) NAS and you are supposed to see all of its shared folders, which you now need to “activate” and “mount.”
Choose one and it will ask you if you want to enter a username and password for this host.
Choose “no“! Then, you will see the list of all the folders it found. Pick one.
(. in my guide there are some photos now but here I can’t post them right now, sorry. )
Local share name give it a name that will describe which machine it is and which shared folder it is (for instance, NASvid, NASmus, NASphoto or PCvid, PCmus or PCphoto).
Mount type NFS, if your machine is Linux based (like my Synology NAS 210j) or CIFS share, if your PC/laptop/NAS has Windows as its operating system.
Server IP 192.168.x.x (local network IP address of your NAS or PC).
Server share it has two slots, divided by the forward slash ( / ) sign (my NAS/NFS shares require both slots but my CIFS/laptop shares require only one slot = the name of the folder itself): NFS/NAS example: /volume1/video and CIFS/PC example: /VIDEO.
Use as HDD replacement no.
Unless you want to record to your NAS or PC over the network, in which case choose “yes” where your box will be recording by default (in Setup Record path /hdd/movie will be that folder).
Mount options leave it as it is (rw,nolock,tcp)
Press OK on RCU to save the «mount».
Note: username and password in User management are not needed, if you did what I did in the beginning of this part of the guide!
You must repeat this procedure for each shared folder on any machine with shared folders you want to stream from.
You can check if the folders are both mounted and active by going out of NetworkBrowser and choosing MountManager Mountpoints management, where you can edit or delete them.
Where to find those folders in E2?
Well, if all goes to plan, all of those «Mount Points» can then be seen in 2 places:
1) Media centre choose My Videos (or Music or Pictures) here, one is given various options, depending on what one has attached to F500HD:
-Internal Flash,
-HDD or
-USB stick and then follow
-all of those shared folders mounted by Mount Manager plugin, from either your NAS or PC/laptop,
2) under: Internal Flash media net they are all there as well.
Normally, we can choose the recording path, like the picon or EPG path. However, if we do this via the plugins, the default path is changed and directed to the NAS partition of your choosing by choosing the partition as “HDD replacement”.
Therefore, the advantage of this approach, is that the default /hdd/movie folder (to record to) will now be on the NAS, if you choose the option to use at least one of the shared folders on the NAS as an «HDD replacement»! HD channels might not record correctly over the net…
Mounting shared folders in MMC by editing fstab
I learnt, thanx to Manolito’s help, how to mount NFS shares from my NAS by editing the fstab file, which is in /etc folder of E2. That is quite an elegant procedure.
For my NAS/NFS shared folders it looks like this: create folders (I make three: filmovi, muzika and fotke folders) in /media/net/, where you will mount your NAS shared folders. This is the
syntax for NFS, if anyone needs to mount a Linux-based NAS:
-192.168.x.x = NAS IP address
-volume1/video = the path to the shared folder with movies I stored on my NAS
-media/net/filmovi — folder to mount it to, in your F500HD with E2
-nfs = type of protocol used by my Linux-based NAS
-the rest is standard, re. the data transfer limit.
This reduces the need for plugins and thereby simplifies E2, making it lighter, faster and more stable. If you mount a USB HDD beforehand, then this is cool to do for NAS.
«Enlightenment is man’s emergence from his self-incurred immaturity. Immaturity is the inability to use one’s own understanding without the guidance of another. This immaturity is self-incurred if its cause is not lack of understanding, but lack of resolution and courage to use it without the guidance of another. The motto of enlightenment is therefore: Sapere aude! Have courage to use your own understanding!
Laziness and cowardice are the reasons why such a large proportion of men, even when nature has long emancipated them from alien guidance. » I. Kant, «Political writings» (1784)