Open-E Knowledgebase
Search:     Advanced search

How do I mount NFS shares under the Linux console?

Article ID: 95
Last updated: 06 Nov, 2009
Views: 123984
How do I mount NFS shares under the Linux console? Rating: 7.5349 / 10
Votes: 43
Posted: 07 Oct, 2008
by:
Updated: 06 Nov, 2009
by:


1.  Go to the GUI:   CONFIGURATION -> NAS settings -> NFS settings and enable the "Use NFS" option, which  allows access to shares and/or snapshots via NFS.
Network File System (NFS) is a protocol for a distributed file system which allows a computer to access files over a network as easily as if they were on its local disks.

2. Go to CONFIGURATION -> NAS resources -> Shares and select a share which will be available via NFS, and select an option in "NFS share access".
   The following NFS options are available:

Allow access IP
    Please enter an IP address or an address range which should be allowed to access NFS.  You can enter a single IP, multiple IPs separated by a semicolon, or an IP address range.  IP addresses not added to the 'Allow write IP' list will have read only access.
Allow write IP
    Please enter an IP address or an address range which should be allowed to write to NFS.  You can enter a single IP, multiple IPs separated by a semicolon, or an IP address range.
Insecure
    Allows incoming connections to originate from ports greater than 1024.
Synchronous
    When this option is enabled, the local file system will wait for the data to be written to the NAS server. NFS performance will be lowered.  However, this will ensure that the data will be written directly to the NAS server and will not be stored in the system cache.
Insecure locks
    Disables authorization of locking requests. Some NFS clients do not send credentials with lock requests and therefore will work incorrectly with secure locks.  In this case you can only lock world-readable files.  If you have such clients, you can use the Insecure locks option.
All squash
    Maps all user IDs to the user nobody and all group IDs to the group nogroup.
No root squash
    Select this option to grant the client machine's root user the root access level to the files on the NAS server.  Otherwise the client root will be mapped to the user and group specified under the Show advanced tab.


Please also note that when you leave the Allow access IP and Allow write IP fields blank, all computers in the subnet will have write access to NFS.  When you set the Allow access IP field and leave the Allow write IP field blank, the specified computers will have read only access and none will have write access. When you set the Allow write IP field without setting the Allow access IP field, the specified IPs will have write access and all computers in the subnet will have read only access.

3. Go to the Linux console and log in as root with the command "sudo su".

4. Create the local mounting directory - /local_mount_point.  You can do it by using the command "mkdir /local_mount_point".

5.  Go to your Linux console and type:

mount -t nfs  server_IP_addr:/share_name /local_mount_point

This syntax tells the kernel to attach the file system found on the device (which is of nfs type) at the local mounting directory.

For DSSV5 builds 3511, 3513 and 3518, the server path must include share as a keyword, i.e. mount -t nfs  server_IP_addr:/share/share_name /local_mount_point

The name of the share is case sensitive in the mount syntax.  It is important to exercise due caution in this respect, as otherwise you might not be able to access the share.

You can mount a share in a synchronous or asynchronous mode.  When using synchronous mode, data is not stored in a buffer, but transferred at once.  In asynchronous mode, the data is first stored in a buffer and then transferred.

In order to mount a share in synchronous mode please use the following command:

mount -t nfs server_IP_addr:/share_name /local_mount_point -o sync

For DSSV5 builds 3511, 3513 and 3518, the server path must include share as a keyword, i.e. mount -t nfs  server_IP_addr:/share/share_name /local_mount_point -o sync


In order to mount a share in asynchronous mode please use the following command:

mount -t nfs server_IP_addr:/share_name /local_mount_point -o async

For DSSV5 builds 3511, 3513 and 3518, the server path must include share as a keyword, i.e. mount -t nfs  server_IP_addr:/share/share_name /local_mount_point -o async

You can also mount a share with the read or read/write access option:

 -r     Allows only read access.  It is used to protect the mounted filesystem from writes.  Even if the filesystem is writeable by the user and is exported, the option still protects it.  A synonym is -o ro.  (used instead of -r)

 -w     Allows both read and write.  Mounts the file system as read/write.  A synonym is -o rw.  (used instead of -w)

This article was:   Excellent | Very Good | Good | Fair | Poor
Prev   Next
NAS     I have a low NFS performance in VMware environment.

The Knowledge base is managed by Open-E data storage software company.
RSS