NSFv4 Sharing

I have this SUSE Linux Enterprise Server 12 and could use some of its storage as NFS share for my openSUSE Tumbleweed desktop. Here is my /etc/exports :

/data/nfs/share     *.unyu.my.id(rw,sync,no_subtree_check,no_all_squash) 192.168.1.300(rw,sync,no_subtree_check,no_all_squash)

/data/nfs/share = my shared directory on SLES 12
*.unyu.my.id = my FQDN (Yes, I paid the domain)
192.168.1.300 = my openSUSE Tumbleweed (Yes I know it’s fake IP address)
(rw,sync,no_subtree_check,no_all_squash) = export mount options, read-write permission for my desktop

Read more: NSFv4 Sharing

So, here is my shell script to mount it as I don’t mount it at system startup to avoid system crash. Give it name with .sh extension, and chmod +x to it.

#!/bin/sh
mount -t nfs 192.168.1.200:/data/nfs/share/ /home/handz106/nfs/

192.168.1.200 = my SLES 12 IP Address
:/data/nfs/share/ = my shared directory on SLES 12, with the trailing slash.
/home/handz106/nfs/ = my mount point on my openSUSE Tumbleweed desktop, with trailing slash.

Run the script at The Konsole as root then you’re good to go: use it at your own will. Don’t forget to open port 2040/TCP on your firewall, be it firewalld or SuSEfirewall2 on the server. My Dolphin file manager shows the mount point in Remote section.

Work till death do me part.

Leave a Reply