OpenSUSE NFS Configuration Tutorial

Posted by Tejus Parikh on May 16, 2007

In a heterogeneous OS environment, the network file system of choice is clearly SMB/CIFS, mostly since heterogeneous implies the existence of windows machines. Lately though, I’ve been getting a little annoyed with some of the quirks of a file-system from the single user Windows world. I also don’t have any Windows machines left. Therefore, when it came time to share one resource to multiple machines, I decided to give NFS a try.

The resources for NFS are out there, but there wasn’t anything specific for openSUSE and some level of translation was required. The two docs I used to get this working where:
RedHat’s and Linux Help’s. If you’re trying to configure nfs on something besides openSUSE, that’s probably a better place to look.

The first step on openSUSE is to open up Yast2 and enter the software management section. Filter on packages with a name containing ‘nfs’ and you should see something like this:
Install NFS
Since this is a server box, I only have the console version of Yast installed. The X version will look similar. Note that the nfs-server package is not installed. This is recommended, since the kernel support for NFS is superior to the userland version. Packages you should have installed are portmap, and yast2-nfs-server. Having NTP installed running is also a good idea, otherwise you might encounter errors about files that only exist in the future.

Once you’ve installed the required packages, it’s time to open the NFS configuration wizard.
configure nfs

This wizard is pretty straight-forward. The first screen asks if you want to start the NFS server (you should say yes), followed by a screen that allows you to configure directories to share (or ‘exports’ in nfs lingo).
Start Server

Add directories

The directory must be an absolute path. You can also specify options such as read-write permissions and how to treat root clients on this screen. After you’ve added a few directories, that’s it. You’re done configuring the server. Yast2 will restart the daemons for you.

You can make sure nfs is running properly on your box by entering the command rpcinfo -p. You should see multiple entries for nfs with both udp and tcp sockets.

verify if nfs is working


Now that the server is functional, it’s time to configure the client. The steps are similar. You need to make sure that you have yast2-nfs-client installed on the machine. The dependencies for this package include everything you need. If you don’t want to use yast, you can just mount the resources manually:
mount server.domain.com:/path/to/resource /where/to/mount
Or if you want to do it the SUSE way, you can open Yast2 on the client, and enter the same information on the NFS Client screen. This will also configure the correct fstab entries for you.

Configure Client

If everything went right, your files will be available at /where/to/mount on the client machine. If it didn’t, then take a look at this troubleshooting guide.

Related Posts:

Tejus Parikh

Tejus is an software developer, now working at large companies. Find out when I write new posts on twitter, via RSS or subscribe to the newsletter: