Archive

Posts Tagged ‘mount’

Ubuntu 9.04 NFS fstab problems

July 19th, 2009 Arthur Gressick No comments

I had a problem with the new release of Ubuntu 9.04 server not mounting remote shares upon boot. Turns out that the network service starts up after fstab now. An easy fix was to edit the /etc/rc.local file here is what I changed/added

/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
 
#mount the NFS Shares
mount -a
 
exit 0

Above just added the “mount -a” just before the exit 0. Hope this helps everyone who is having the same problem. Seems to work perfect for me.

Categories: Ubuntu 9.x Server Tags: , ,

Ubuntu NFS Server

February 12th, 2009 Arthur Gressick No comments

Well I always seem to need these notes for setting up the NFS server for Ubuntu so here they are. Also I found NFS to be a great storage share for anything related to backing up or moving around files. I even use it for VMware and databases.

NFS Installation

Run this as root

apt-get install nfs-kernel-server nfs-common portmap

When configuring portmap do not bind loopback. If you do you can either edit /etc/default/portmap using the following:

nano /etc/default/portmap

Restart Portmap using the following command

/etc/init.d/portmap restart

NFS Server Configuration

NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients.

You need to edit the exports file using the following command

nano /etc/exports

Here are the mounts for our infrastructure

/mnt/left_raid/nfs 10.10.1.0/255.255.255.0(rw,sync,no_subtree_check)

Now you need to restart NFS server using the following command

/etc/init.d/nfs-kernel-server restart

If you make changes to /etc/exports on a running NFS server, you can make these changes effective by issuing the command

exportfs -a

Client Connection
This is the command you would want to run from a computer that would connect back to the NAS

mount 10.10.2.100:/mnt/left_raid/nfs /mnt/nas

Additional Information
If you’re connection to a Linux NFS server from Mac OS X, you need to specify ‘insecure’ in your exports and map the user IDs since Macs use uid 501 for the first regular user. For my /etc/exports I use:

/home 192.168.0.0/255.255.255.0(rw,async,insecure,all_squash,anonuid =1000,anongid=1000)