Mounting NAS (via NFS) in Linux?

Post Reply
redreptionil
Posts: 18
youtube meble na wymiar Warszawa
Joined: Fri Jun 05, 2015 8:45 am

Mounting NAS (via NFS) in Linux?

Post by redreptionil »

According to:

http://download.asustor.com/college/en/ ... _Linux.pdf

To access my AS5002T via NFS in Linux, I have to first enable NFS under Services. Then I'm supposed to go to Access Control and click the Access Rights tab for the folder I want to access. The problem is, I want to access my Home folder. When I select either that or User Homes, the Access Rights tab doesn't activate. Without being able to use that tab, I can't allow my computer's IP address access to that folder. How am I supposed to accesss my Home folder via NFS in Linux?

Skipping over that for now, the second step is supposed to be going to Terminal on the Linux machine and mounting the NAS by entering:

mount -t nfs <ASUSTOR NAS IP>:/<Network Share Name> <Directory to Mount>

Since that's being done from within Terminal, I assume it's only good until the computer is rebooted. Does anyone have the command to enter into /etc/fstab so the NAS mounts automatically at every boot? I keep seeing things like:

server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr

Where "server" is supposed to be the hostname of the NFS server, "/usr/local/pub" is supposed to be the directory on the server being exported, and "/pub" is supposed to be the directory on the local machine where the NFS share is to be mounted. So in my case (on the assumption I can actually access my Home directory via NFS), perhaps it should be:

AS5002T-B202:/volume1/home /home/dave/NASHome nfs rsize=8192,wsize=8192,timeo=14,intr

AS5002T-B202 is my server name. But, I don't know if that's what I'm supposed to use as "Hostname." I'd also have to have already created the NASHome directory under my local home folder.

BTW: it would be a good idea if ASUSTOR made an IN-DEPTH lesson in their ASUSTOR College for getting these NASes working in Linux. Since ADM is supposedly based on Linux, I had assumed it would be easy. Unfortunately, it's much harder than it is under Windows.
Mr90
Posts: 5
Joined: Thu Aug 22, 2013 10:55 pm

Re: Mounting NAS (via NFS) in Linux?

Post by Mr90 »

Hi

I'm not used to use fstab to mount NFS shares, but i use a very simple script to mount my shares.

#!/bin/bash
mount -t nfs -o rw 10.0.100.200:/volume1/Download /server/nas/Download
echo "connected to nas"

You could save this as /etc/mountnas.sh. Make it executable by running "chmod +x /etc/mountnas.sh" end execute it in console as root by typing /etc/mountnas.sh

This is just an example where the script will connect to the "Download" folder located on /volume1/Download on my nas "10.0.100.200". The local mount point on my laptop is /server/nas/Download. I can make this little script mount on startup on my Slackware laptop if i want to. I would need to make the folder /server/nas/Download on my laptop before attemting to mount this.

IF i would try to make an fstab entry, i would try:

10.0.100.200:/volume1/Download /server/nas/Download nfs defaults 0 0

I dont know if this would work, but try "defaults" or "auto" option before tuning the options. It should be fairly simple to solve by doing some googling. It's not an Asustor thing, its basic nfs.

Good luck. Sorry for my english. :)
redreptionil
Posts: 18
Joined: Fri Jun 05, 2015 8:45 am

Re: Mounting NAS (via NFS) in Linux?

Post by redreptionil »

Well, since I can't seem to even authorize access to my own private Home account on the NAS (either via Home or via User Homes), I'm giving up on NFS. Now I'm trying to work things out with SSH. Unfortunately, it looks like I have to sign in as admin or root (i.e., I can't sign in with my own user name even though it's an admin account). Also (so far), once this linux machine connects to it, it does so at the root of the NAS: I've got to navigate to my Home folder.
Sloan
Posts: 3
Joined: Sat Jul 22, 2017 8:11 pm

Re: Mounting NAS (via NFS) in Linux?

Post by Sloan »

I've the problem with the user home directory mounting via nfs too. Is there a solution right now?
marp
Posts: 17
Joined: Tue Jan 31, 2017 4:48 pm

Re: Mounting NAS (via NFS) in Linux?

Post by marp »

Add to your /etc/fstab file something like that:

192.168.x.x:/volume1/SharedFolder /localFolder nfs soft,auto,user,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0

Where 192.168.x.x is your NFS IP address
/volume1/SharedFolder is your NAS shared folder, as configured on the interface
/locaFolder is your local folder on the Unix machine where you are lounting the nfs share.
Sloan
Posts: 3
Joined: Sat Jul 22, 2017 8:11 pm

Re: Mounting NAS (via NFS) in Linux?

Post by Sloan »

The line in /etc/fstab is already in there. When i try to mount the error occures: mount.nfs: access denied by server while mounting

I can't set nfs permissions in ADM for the "Home" and "User Homes" folders. The button is disabled.
Post Reply

Return to “[Official] For AS50xx/51xx Series”