FedFsNfsServer0.9

From Linux NFS

(Difference between revisions)
Jump to: navigation, search
(Install the nfsref command)
 
(11 intermediate revisions not shown)
Line 13: Line 13:
== Introduction ==
== Introduction ==
-
A ''junction'' is a link between two shared file systems.  The two shared file systems may not reside on the same server.  There may be more than one replica of the linked-to shared file system, stored on several different file servers.  Each replica of the linked-to file system is called a ''location''.
+
A [[FedFsGlossary#Junction|junction]] is a link between two shared file systems.  Junctions tie together disparate filesystems to create a [[FedFsGlossary#FedFs_Domain|FedFS domain]].
-
Junctions store a list of locations.  Each location in the list is represented as an export path paired with a server name or IP address.  When a file-access client encounters a junction, the file server (via a ''referral'') provides the stored list of locations to the client, who chooses a location and mounts it.
+
A junction stores a list of [[FedFsGlossary#Location|locations]].  When a client attempts to access a junction, a file server converts this list into a [[FedFsGlossary#Referral|referral]].  Converting a junction's location list to a referral is known as [[FedFsGlossary#Junction_Resolution|junction resolution]].
-
A file server must convert the information stored in a junction into a list of locations that's in a format which is correct for the protocol clients are using to access the server (say, NFSv4)The server-side process of recognizing a junction and converting its contents is known as ''junction resolution''.
+
On Linux, a junction is denoted by a directory with special mode bits and an extended attribute that contains the junction location listWhen the Linux in-kernel NFS server encounters a junction, it resolves the junction by performing an upcall to mountdmountd reads the contents of the junction and converts them to information that the kernel NFS server can put on the wire as an NFSv4 referral.
-
 
+
-
A single junction is useful for linking together two shared file systemsA web of junctions can be used to create a namespace that crosses between multiple file systems on multiple file servers.  FedFS uses junctions for just such a purpose.
+
This article describes how to configure a Linux NFS server to resolve junctions.  Once a file server can resolve junctions in its local file systems, it can participate in a FedFS domain.
This article describes how to configure a Linux NFS server to resolve junctions.  Once a file server can resolve junctions in its local file systems, it can participate in a FedFS domain.
-
== Prepare mountd to resolve junctions ==
+
== Build nfs-utils ==
-
On Linux, a junction is denoted by a directory with special mode bits and an extended attribute that contains the junction location listThe NFS server must convert the junction's location information into an NFSv4 referral.
+
On Fedora 19, rpc.mountd already has working junction resolution supportOn other distributions, you'll need to build a version of rpc.mountd with working junction resolution support.
-
When the Linux in-kernel NFS server encounters a junction, it resolves the junction by performing an upcall to mountd. It is mountd that actually reads a junction and converts it to information that the kernel NFS server can put on the wire as an NFSv4 referral.
+
Firstyou'll need to install the nfs-plugin.h header.
-
=== Pre-packaged install ===
+
* [[FedFsUtilsBuild0.9|Building fedfs-utils-0.9]]
-
If you are running Fedora 19, you can install a pre-packaged version of fedfs-utils-0.9.  The server-side components are installed with:
+
The "make install" step should install the header in /usr/include/nfs-plugin.h .  If not, you can find it in fedfs-utils-0.9/src/include/nfs-plugin.h and install it by hand.
-
# yum install fedfs-utils-server
+
Now download and unpack the latest nfs-utils tarball on the same system where you built fedfs-utils.   Build nfs-utils, and replace rpc.mountd on your NFS serverThe configure options are complicated;  I usually copy them from the latest nfs-utils RPM spec file from my distribution.
-
 
+
-
The rpc.mountd in this distribution is already prepared for junction resolution.
+
-
 
+
-
=== Build fedfs-utils ===
+
-
 
+
-
If your distribution does not provide a pre-packaged version of fedfs-utils-0.9, follow these steps instead.
+
-
 
+
-
Unpack the fedfs-utils-0.9 tarball somewhere convenient.  For example:
+
-
 
+
-
$ cd fedfs-utils-0.9
+
-
$ ./configure
+
-
$ make
+
-
 
+
-
Note: If you're building for a 64-bit target, specify the directory in which to install libraries (by default for 64-bit, this is somewhere mountd can't find it).  Add "--libdir=/usr/lib64" to the ./configure command line.
+
-
 
+
-
There are three pieces that need to be installed first.  The plug-in library:
+
-
 
+
-
# cd fedfs-utils-0.9/src/plug-ins ; make install
+
-
 
+
-
The header describing the library's API:
+
-
 
+
-
# cd fedfs-utils-0.9/src/include ; make install
+
-
 
+
-
And finally, the "nfsref" command:
+
-
 
+
-
# cd fedfs-utils-0.9/src/nfsref ; make install
+
-
 
+
-
If you're feeling brave, a single "make install" in the top level directory should take care of all of this, and provide lovely man pages to boot.
+
-
 
+
-
=== Build nfs-utils ===
+
-
 
+
-
Now download and unpack the latest nfs-utils tarball.  Build and replace rpc.mountd on your NFS server (The configure options are complicated;  I usually copy them from the Fedora nfs-utils RPM spec file).
+
  $ ./configure yada yada
  $ ./configure yada yada
Line 74: Line 40:
  # systemctl restart nfs-server.service
  # systemctl restart nfs-server.service
-
 
-
== Install the nfsref command ==
 
-
 
-
If you are running Fedora 19, the nfsref command is packaged as part of the fedfs-utils-server RPM can be installed with this command:
 
-
 
-
# yum install fedfs-utils-server
 
-
 
-
If you prefer a distribution that does not pre-package fedfs-utils-0.9, you can build fedfs-utils from the release tarball.
 

Latest revision as of 18:06, 9 January 2013

Project: fedfs-utils

[ Project Home | News | Downloads | Docs | Mailing Lists | Source Control | Issues ]


Introduction

A junction is a link between two shared file systems. Junctions tie together disparate filesystems to create a FedFS domain.

A junction stores a list of locations. When a client attempts to access a junction, a file server converts this list into a referral. Converting a junction's location list to a referral is known as junction resolution.

On Linux, a junction is denoted by a directory with special mode bits and an extended attribute that contains the junction location list. When the Linux in-kernel NFS server encounters a junction, it resolves the junction by performing an upcall to mountd. mountd reads the contents of the junction and converts them to information that the kernel NFS server can put on the wire as an NFSv4 referral.

This article describes how to configure a Linux NFS server to resolve junctions. Once a file server can resolve junctions in its local file systems, it can participate in a FedFS domain.

Build nfs-utils

On Fedora 19, rpc.mountd already has working junction resolution support. On other distributions, you'll need to build a version of rpc.mountd with working junction resolution support.

First, you'll need to install the nfs-plugin.h header.

The "make install" step should install the header in /usr/include/nfs-plugin.h . If not, you can find it in fedfs-utils-0.9/src/include/nfs-plugin.h and install it by hand.

Now download and unpack the latest nfs-utils tarball on the same system where you built fedfs-utils. Build nfs-utils, and replace rpc.mountd on your NFS server. The configure options are complicated; I usually copy them from the latest nfs-utils RPM spec file from my distribution.

$ ./configure yada yada
$ make
$ sudo install utils/mountd/mountd /usr/sbin/rpc.mountd

Then restart the NFS service.

# systemctl restart nfs-server.service
Personal tools