Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was hoping that you could help me with a project please.
Background / History:
I have a Synology DS413J NAS device.
It was working well for many years, however a while ago It had a hard drive
failure (was in SHR / RAID-5) so I managed to retrieve my data.
I have very recently decided to set this up again from scratch and bought
some new HDD's (again x3, 4TB drives in SHR / RAID-5)
I am trying to set up the mount points, but I'm struggling.
Steps already taken:
1. Set up a static ip (via DHCP reservation) address for my NAS
2. Set up a static ip (via DHCP reservation) address for my client PC
3. (On the NAS)
Added both the NAS and the client PC to the hosts file
Added both the NAS and the client PC to the hosts.allowed file
4. (On the client PC)
Added both the NAS and the client PC to the hosts file
Added both the NAS and the client PC to the hosts.allowed file
5. (On the NAS)
Added both the NAS and the client PC to the exports file
6. (On the client PC)
Added both the NAS and the client PC to the exports file
Questions:
1. How do I create a mount point (on the client PC) to allow it to see / access
the NAS box ?
2. Whic dir, do I create the mount point in ? -
mnt
media
var
3. What other steps do I need to do, in order to get this to work ?
TIA for any help or advice
Useful details:
NAS: Synology DS413J
NAS OS: DSM 6.2.4-25556
PC details:
OS: Ubuntu 20.04 LTS
OS type: 64-bit
DE: KDE 5.18.8
Kernel: 5.14.0-1051-oem
CPU: 4x Intel Core-2 Q8200 (@2.33 Ghz)
GFX: Intel HD
RAM: 8GB
#1 you really should have examined the man pages and documentation on NFS and /etc/exports before starting. You have gone as far to making your PC an NFS server as the NAS box!
As above, the export file is on the server only. The client just needs the client software of NFS installed to be able to mount a folder that was defined in the export file on the NAS server. Simple. Only big gotcha is user permissions to information on the server.
You can mount the share almost anywhere just a matter of preference, I would use /mnt.
How the client is configured sort of depends on if you are using version 3 or 4. There are lots of guides on the internet. All you need on the client for software is the nfs-common package. On my Synology NAS everything is a sub-directory of the /volume1 directory.
sudo mount -t nfs NAS:/volume1/share_name /mnt/where_ever
@michaelk
I have used Synology's DSM (ver 6.2.4-25556) to set up the NFS shared dirs on the NAS
(I beleive that I'm using NFS (ver 3) as I specifically did not use the check box
for NSF Ver 4/4.1 (as I'm led to beleive that it allows more granualar access
and permissions, at the price of further complexity).
I'm just looking to get this NAS up and running on my internal network for now
I don't have a burning desire to access my media via the internet ATM
07. I have added mount points for the NAS in my fstab file on my client PC (corellia)
(see below):
14. (On the client PC) Running the following command:
Code:
mount | grep nfs
Result:
Code:
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
hoth:/volume1/music on /mnt/music_share/music type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.138,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.1.138)
hoth:/volume1/photos on /mnt/photo_share/photo type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.138,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.1.138)
hoth:/volume1/videos on /mnt/video_share/video type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.138,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.1.138)
I had to change the "Squash" settings to: "Map all users to Admin"
This is what allowed my to access the NAS shared folders on the client.
15. Here are the setps I took to fix it:
(On the NAS)
Log into the web interface > Control panel > Shared folder > (Chose the folder you want to
allow access to from a client).
Edit > NFS permissions > Chose host > Edit > Select the option called "Squash" >
Chose - Map all users to Admin > OK > (Wait for this to be saved)
Thank you to all who shared their time and knowleged with me to get this sorted
It's much appreciated !
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.