Nfs

From Wsms

Jump to: navigation, search

Note: This page should be titled nfs (all lowercase). It is Nfs due to technical limitations of Mediawiki.

nfs is a convenient and flexible file sharing system for Linux and other unix systems.

Contents

installation

Use yum (on fedora) or apt-get (on debian and derivatives).

server

On Linuxmint 3.0 the package to install is nfs-kernel-server. apt-get will also install the necessary dependencies.

client

On Linuxmint 3.0 the package to install is nfs-common. apt-get will also install the necessary dependencies.

set up

server

You need to set up /etc/exports. It might look like this:

/media/sda4        192.168.11.5(ro,sync)

client

Mount the exported directory with a command like this:

root@harrison:/mnt# mount -t nfs 192.168.11.4:/media/sda4 garfield

Once it works, df -h will show something like this:

ggeller@harrison:~$ df -h
Filesystem            Size  Used Avail Use% Mounted on
...
192.168.11.4:/media/sda4
                      265G   25G  227G  10% /mnt/garfield

tip

If you get an error like:

mount: 192.168.2.14:/media/sdd4: can't read superblock

Try using the -o nolock option:

root@Knoppix:/mnt# mount -t nfs -o nolock 192.168.2.14:/media/sdd4 mckinley/

see also

man nfs
Linux_commands

Personal tools