SCIENTIFIC-LINUX-USERS Archives

May 2012

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 3 May 2012 14:15:18 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (59 lines)
On Thu, May 3, 2012 at 11:17 AM, Tam Nguyen <[log in to unmask]> wrote:
> On Thu, May 3, 2012 at 10:34 AM, Bob Goodwin - Zuni, Virginia, USA
> <[log in to unmask]> wrote:
>>
>> Can someone suggest a clear instruction for setting up an NSF4
>> server on SL6.2/64, preferably with an example.
>>
>> I have NFS3 working on SL5 but haven't been able to get this new
>> one working ...
>
> See the steps below. Please keep in mind this is very basic configuration
> just to get it up and running. Haven't cover authentication, ACL, SELinux,
> etc.
>
> install package
> $ yum install nfs-utils
>
> Add port 2049
> $ vi /etc/sysconfig/iptables
> -A INPUT -p tcp --dport 2049 -j ACCEPT
> -A INPUT -p udp --dport 2049 -j ACCEPT
>
> Restart iptables
> $ service iptables restart
>
> Start nfs service + survive reboot
> $ /etc/init.d/nfs start
> $ /etc/init.d/nfslock start
> $ chkconfig nfs on
>
> Create a test directory
> $ mkdir -p /nfs_test
>
> Edit nfs export file:
> $ vi /etc/exports
> /nfs_test *(ro,sync) <== esoteric indicates world accessible
>
> Now export it:
> $ exportfs -a
>
> Verify it:
> $ exportfs
>
> Go to your client box, and test it. Like so:
> $ mount -t nfs server:/nfs_test /client/mount/point

I'd do it slightly differently:

# cat /etc/exports
/nfsv4exports *(ro,sync,fsid=0)
/nfsv4exports/nfs_test *(rw,sync,...)

You can then use the same mount command (because "fsid=0" turns
"/nfsv4exports" into a virtual "/" for nfsv4).

The reason that I use "fsid=0" (or the equivalent "fsid=root") is that
I've had problems mounting an nfsv4 export in the past without it and
adding the fsid "feature" always fixed the problem.

ATOM RSS1 RSS2