cluster:Nfs/4

From Dgiref
Jump to: navigation, search

Contents

Introduction

Geographylogo.png A network file system (NFS) is any computer file system that supports files sharing, printers and other resources as persistent storage over a computer network. By using NFS, users and programs can access files on remote systems almost as if they were local files.

NFS consists of two main parts: a server and one or more clients. The client remotely accesses the data that is stored on the server machine. To do the job well, a few processes have to be configured and running. There are some benefits which NFS provides:

  • Local workstations use less disk space because commonly used data can be stored on a single machine and still remain accessible to others over the network.
  • There is no need for users to have separate home directories on every network machine. Home directories could be set up on the NFS server and made available throughout the network.
  • Storage devices can be used by other machines on the network. This may reduce the number of removable media drives throughout the network.

NFSv4 supports several security flavors, including:

  • AUTH_SYS (also known as AUTH_UNIX) represents the traditional low-security model found in NFSv2/v3. Provides UNIX-style credentials by using UIDs and GIDs to identify the sender and recipient of RPC messages.
  • RPCSEC_GSS - new security flavor. Introduces secure authentication, integrity, and encryption. It is based on GSS-API. The three required security triples when using RPCSEC_GSS are:
    • Kerberos 5 for enterprise/LAN use
    • LIPKEY (based on SPKM-3) for Internet use
    • SPKM-3

The D-Grid reference installation use the model: one export point pro NFS server. To reduce the number of the mount points for the NFS clients and set the shared structure into one directory. The clients mount (server exports) /srv/nfs/ directory, and allocate links for appropriate shared resource. The AUTH_SYS security model for NFSv4 is choosed.

Monitoring of the current NFS activity can be done with the command: watch nfsstat -r -o net


Package:    NFS v. 4
 os:             Scientific Linux version 5.6 64 bit
 server:        dgireffs1.fzk.de
 manuals:   nfs4 server / nfs4 client


Archive links
Information links
Download links



Please open a NGI-DE ticket if you experience any Installation or Configuration problem.

NFS server v.4

Prepare

Operating system
Scientific Linux version 5.6 64 bit

Optimizing the configuration:


Use minimal operating system installation without firewall. To verify installed packages use the command

  • rpm -qa | grep package_name

Install the following additional packages:

  • yum -y install wget yum rpm make gcc gcc-c++ tar sed zlib openssl

After the installation is complete, turn off any unnecessary services (like gpm, sendmail, cups, haldaemon, messagebus, pcmcia, anacron, atd) with the following command:

  • chkconfig <SERVICE> off

Configure the following settings for the server:

Note-icon.png
  
Prepare new hard disk
  • To export a brand new disk through nfs, the corresponding device in the /dev directory must be find (use the boot log messages from /var/log). Lets assume that the new device is /dev/hdg.
  • Create the new partition on your disk with the command: fdisk /dev/hdg. Follow the instructions and create one big partition /dev/hdg1.
  • Format the new partition with the ext3 file system with the following command: mkfs -t ext3 -c /dev/hdg1 ("-c" options search for invalid disk sectors).
  • Create the new export directory (/srv/nfs) and change the permission to 1777 and mount the partition on it.
  • The new device will be mounted on boot on the selected directory.
Firewall configuration

Install

  • Install the actual versions of
    • nfs-utils
    • portmap
    • quota
  • Create the mount directory


Configure

The NFS server has to be configured to export filesets, like the users home directories, the system software (etc/profile.d, ogsadai), the VO specific software areas, the UNICORE filespace. Server in D-Grid reference installation exports only one directory, located into /srv/nfs with the following attributes:

Export Export options Node Mountpoint Mount options
nfs /srv/nfs rw,fsid=0,insecure,no_subtree_check,sync alle /srv/nfs rw,hard,intr,proto=tcp,port=2049,noauto
nfs /srv/nfs/home rw,nohide,insecure,no_subtree_check,sync alle /srv/nfs rw,hard,intr,proto=tcp,port=2049,noauto
nfs /srv/nfs/software rw,nohide,insecure,no_subtree_check,sync alle /srv/nfs rw,hard,intr,proto=tcp,port=2049,noauto


Proceed

  • /etc/init.d/portmap - used on the client and server
  • /etc/init.d/nfs - required on the server
  • /etc/init.d/rpcidmapd - required on both client and server
  • /etc/init.d/rpcsvcgssd - required on the server when RPCSEC_GSS is used

Initial test

Try to examine the output from the following commands:

  • rpcinfo -p to check the rpc
  • netstat -tupa to display the open ports for the applications

Update

The direct way to update or delete the installed nfs rpm software package is to use the yum or rpm.

Please open a NGI-DE ticket if you experience any Installation or Configuration problem.

NFS client v.4

Prepare

Operating system
Scientific Linux version 5.6 64 bit

Optimizing the configuration:


Use minimal operating system installation without firewall. To verify installed packages use the command

  • rpm -qa | grep package_name

Install the following additional packages:

  • yum -y install wget yum rpm make gcc gcc-c++ tar sed zlib openssl

After the installation is complete, turn off any unnecessary services (like gpm, sendmail, cups, haldaemon, messagebus, pcmcia, anacron, atd) with the following command:

  • chkconfig <SERVICE> off

Configure the following settings for the server:

Note-icon.png
  
Prepare new hard disk
  • To export a brand new disk through nfs, the corresponding device in the /dev directory must be find (use the boot log messages from /var/log). Lets assume that the new device is /dev/hdg.
  • Create the new partition on your disk with the command: fdisk /dev/hdg. Follow the instructions and create one big partition /dev/hdg1.
  • Format the new partition with the ext3 file system with the following command: mkfs -t ext3 -c /dev/hdg1 ("-c" options search for invalid disk sectors).
  • Create the new export directory (/srv/nfs) and change the permission to 1777 and mount the partition on it.
  • The new device will be mounted on boot on the selected directory.
Firewall configuration

Install

  • Install the actual versions of
    • nfs-utils
    • portmap
    • quota
  • Create the mount directory

Configure

Note-icon.png
  
NFS client should mount the /srv/nfs directory, but some softlinks should point to the /srv/nfs subdirectories. For example:
  • for all hosts in cluster
    • /home -> /srv/nfs/home
    • /software -> /srv/nfs/software
  • for WNs
    • /opt/glite-wn -> /srv/nfs/software/glite-wn/
    • /opt/d-grid -> /srv/nfs/software/vos/
    • /etc/profile.d/dgrid_env.sh -> /opt/d-grid/etc/profile.d/dgrid_env.sh
    • /uspace -> /srv/nfs/uspace
  • for gLite CE
    • /opt/glite-wn -> /srv/nfs/software/glite-wn/
    • /opt/d-grid -> /srv/nfs/software/vos/
    • /etc/profile.d/dgrid_env.sh -> /opt/d-grid/etc/profile.d/dgrid_env.sh
    • /etc/profile.d/grid-env.sh -> /opt/glite/etc/profile.d/grid-env.sh
    • /etc/profile.d/grid-env.csh -> /opt/glite/etc/profile.d/grid-env.csh
  • for Unicore
    • /uspace -> /srv/nfs/uspace

Proceed

  • /etc/init.d/portmap - used on the client and server
  • /etc/init.d/rpcidmapd - required on both client and server
  • /etc/init.d/rpcgssd - required on the client when RPCSEC_GSS is used

Initial test

Try to examine the output from the following commands:

  • rpcinfo -p to check the rpc
  • netstat -tunap to display the open ports for the applications

Update

The direct way to update or delete the installed nfs rpm software package is to use the yum or rpm.

Personal tools