FedFsNfsAutomounter0.9

From Linux NFS

(Difference between revisions)
Jump to: navigation, search
(Introduction)
 
(One intermediate revision not shown)
Line 13: Line 13:
== Introduction ==
== Introduction ==
-
One goal of FedFS is to present applications with the same file namespace no matter what client instance they are running on.  These consistent FedFS pathnames are called ''[[FedFsGlossary#Globally_Useful_Names|Globally Useful Names]].''
+
One goal of FedFS is to present applications with the same file namespace no matter what client instance they are running on.  These consistent FedFS pathnames are called [[FedFsGlossary#Globally_Useful_Names|Globally Useful Names]].
-
A Globally Useful Name begins with a top level directory named after the file-access protocol used to access files in that namespace.  For NFS, that's /nfs4.  Subdirectories of this directory are named after FedFS domains.  They are mounted when someone on the local client changes into a directory under /nfs4 named after a corresponding ''[[FedFsGlossary#FedFs_Domain|FedFS domain]]''.
+
A Globally Useful Name begins with a top level directory named by the file-access protocol used to access files in that namespace.  For NFS, that's /nfs4.  Subdirectories of this directory are named after FedFS domains.  They are mounted when someone on the local client changes into a directory under /nfs4 named after a corresponding [[FedFsGlossary#FedFs_Domain|FedFS domain]].
Under /nfs4, you might see, for example, a corporate.example.com directory, a sales.example.com directory, and an engineering.example.com directory.  Each of these directories contains the directories and data in its respective FedFS domain.
Under /nfs4, you might see, for example, a corporate.example.com directory, a sales.example.com directory, and an engineering.example.com directory.  Each of these directories contains the directories and data in its respective FedFS domain.
-
On Linux, autofs is used to create the top level of the space of Global Useful Names.  Once the domain root directory of a FedFS domain is mounted, the Linux NFS client mounts the lower parts of each domain's namespace.
+
On Linux, an autofs program map is used to create the top level of the space of Global Useful Names (that is, the contents of the /nfs4 directory).  Once the domain root directory of a FedFS domain is mounted, the Linux NFS client mounts the lower parts of each domain's namespace.
At this time, there is no way to allow an "ls" in /nfs4 to show possible FedFS domains.  Autofs will unmount and remove idle directories in the /nfs4 directory automatically, so the /nfs4 directory often appears empty.  Users and applications have to know the names of interesting FedFS domains in order to start populating the FedFS namespace on their clients.
At this time, there is no way to allow an "ls" in /nfs4 to show possible FedFS domains.  Autofs will unmount and remove idle directories in the /nfs4 directory automatically, so the /nfs4 directory often appears empty.  Users and applications have to know the names of interesting FedFS domains in order to start populating the FedFS namespace on their clients.
-
== Installing autofs ==
+
== Install autofs ==
Most recent distributions have a pre-built version of autofs installed by default.  If you see the file /etc/auto.master on your clients, then autofs is already installed.  If it is not yet installed, consult your distribution's system administration documentation for the steps needed to install and configure autofs.
Most recent distributions have a pre-built version of autofs installed by default.  If you see the file /etc/auto.master on your clients, then autofs is already installed.  If it is not yet installed, consult your distribution's system administration documentation for the steps needed to install and configure autofs.
-
== Installing the FedFS program map ==
+
== Install nfs-utils ==
-
A program map is used to convert a FedFS domain name to the correct NFS server to mount under /nfs4Fedora 19 provides a pre-built fedfs-utils-0.9 package. A pre-packaged version of the program map executable can be installed with:
+
The automounter and program map use /sbin/mount.nfs to mount NFS servers, which is typically installed by default on most distributionsConsult your distribution's administrative documentation for instructions on how to install the nfs-utils package.
-
# yum install fedfs-utils-client
+
== Configure Autofs ==
-
The executable is installed in /usr/sbin/fedfs-map-nfs4 .
+
We assume here that fedfs-utils is [[FedFsInstallationGuide0.9#Building_fedfs-utils_0.9|already installed]]Create the top level directory for the FedFS namespace:
-
 
+
-
If your distribution does not provide a pre-packaged version of fedfs-utils, you can build it from scratch.  After downloading the fedfs-utils-0.9 tarball and unpacking it in a convenient place, the usual "./configure; make" ritual will suffice.  The program map is in src/mount/fedfs-map-nfs4.  Use the install program to install it:
+
-
 
+
-
# install src/mount/fedfs-map-nfs4 /usr/sbin
+
-
 
+
-
The program map employs the /sbin/mount.nfs program to populate the /nfs4 directoryEnsure that your client has /sbin/mount.nfs installed.
+
-
 
+
-
== Final steps ==
+
-
 
+
-
Now that you have autofs working and the FedFS program map installed on your client, create the top level directory for the FedFS namespace:
+
   # mkdir /nfs4
   # mkdir /nfs4
-
Add the program map to /etc/auto.master by introducing this line:
+
Add this line to /etc/auto.master:
   /nfs4    /usr/sbin/fedfs-map-nfs4
   /nfs4    /usr/sbin/fedfs-map-nfs4
Restarting the autofs daemon or rebooting your client should be enough to complete the configuration.
Restarting the autofs daemon or rebooting your client should be enough to complete the configuration.

Latest revision as of 17:45, 9 January 2013

Contents

Project: fedfs-utils

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


Introduction

One goal of FedFS is to present applications with the same file namespace no matter what client instance they are running on. These consistent FedFS pathnames are called Globally Useful Names.

A Globally Useful Name begins with a top level directory named by the file-access protocol used to access files in that namespace. For NFS, that's /nfs4. Subdirectories of this directory are named after FedFS domains. They are mounted when someone on the local client changes into a directory under /nfs4 named after a corresponding FedFS domain.

Under /nfs4, you might see, for example, a corporate.example.com directory, a sales.example.com directory, and an engineering.example.com directory. Each of these directories contains the directories and data in its respective FedFS domain.

On Linux, an autofs program map is used to create the top level of the space of Global Useful Names (that is, the contents of the /nfs4 directory). Once the domain root directory of a FedFS domain is mounted, the Linux NFS client mounts the lower parts of each domain's namespace.

At this time, there is no way to allow an "ls" in /nfs4 to show possible FedFS domains. Autofs will unmount and remove idle directories in the /nfs4 directory automatically, so the /nfs4 directory often appears empty. Users and applications have to know the names of interesting FedFS domains in order to start populating the FedFS namespace on their clients.

Install autofs

Most recent distributions have a pre-built version of autofs installed by default. If you see the file /etc/auto.master on your clients, then autofs is already installed. If it is not yet installed, consult your distribution's system administration documentation for the steps needed to install and configure autofs.

Install nfs-utils

The automounter and program map use /sbin/mount.nfs to mount NFS servers, which is typically installed by default on most distributions. Consult your distribution's administrative documentation for instructions on how to install the nfs-utils package.

Configure Autofs

We assume here that fedfs-utils is already installed. Create the top level directory for the FedFS namespace:

 # mkdir /nfs4

Add this line to /etc/auto.master:

 /nfs4    /usr/sbin/fedfs-map-nfs4

Restarting the autofs daemon or rebooting your client should be enough to complete the configuration.

Personal tools