Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Commands & Shells

Create NFS share from QNAP CLI

Submitted by on June 13, 2016 – 2:21 pm

In this example we create the “test” NFS share on a QNAP NAS from CLI and export it to client_ip_01 and client_ip_02. Things to keep in mind: this only creates an NFS share – not a Samba share. To create a Samba share, look at the “/sbin/addshare” command.Determine the mountpoint for your data volume:

[~] # df -h | grep share
/dev/mapper/cachedev1    12.7T     11.2T      1.5T  88% /share/CACHEDEV1_DATA1

SSH to the QNAP as admin user (QNAP does not have a root account).

Add the new NFS share to nfssetting:

vi /etc/config/nfssetting

# ADD:

/share/CACHEDEV1_DATA/test = TRUE
/share/CACHEDEV1_DATA/test = <client_ip_01>,<client_ip_02>
/share/CACHEDEV1_DATA/test = rw,rw
/share/CACHEDEV1_DATA/movies = no_root_squash,no_root_squash
/share/CACHEDEV1_DATA/movies = 65534,65534
/share/CACHEDEV1_DATA/movies = 65534,65534

Update /etc/exports
/sbin/gen_exports > /etc/exports
/usr/sbin/exportfs -r 1>/dev/null 2>/dev/null
# OR
/etc/init.d/nfs restart

Check that the new export has been configured:
grep test /etc/exports

Confirm that QNAP NFS server is accessible from client:
/usr/sbin/showmount -e <qnap_ip>

Optional steps for initial NFS configuration:

Enable NFS services at boot time:

setcfg NFS Enable True

Re-/start NFS server:
/etc/init.d/nfs restart


Print Friendly, PDF & Email

Leave a Reply