cluster:Nfs/3/server

From Dgiref
Jump to: navigation, search
Please open a NGI-DE ticket if you experience any Installation or Configuration problem.

Contents

NFS server v.3

Prepare

Operating system
Scientific Linux version 4.7 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

Probably, the operating system has nfs service installed. To be sure, the following packages will be installed:

  • nfs-utils
  • portmap
  • quota


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,async alle /srv/nfs nosuid

Another requirements are to configure /etc/hosts.deny and /etc/hosts.allow configurations files. Add lines like the following (template: daemon_name: ALL):

cat /etc/hosts.deny
portmap: ALL
lockd: ALL
statd: ALL
mountd: ALL
rquotad: ALL

In the file /etc/hosts.allow the lines for each of the five daemons:

  1. portmap
  2. lockd
  3. statd
  4. mountd
  5. rquotad

should look like this (template: daemon_name: ip.pc.client1, ip.pc.client2):

cat /etc/hosts.allow
portmap: ip.pc.client1, ip.pc.client2
lockd: ip.pc.client1, ip.pc.client2
statd: ip.pc.client1, ip.pc.client2
mountd: ip.pc.client1, ip.pc.client2
rquotad: ip.pc.client1, ip.pc.client2


Proceed

To run an NFS server, the portmap service must be running. To verify that portmap is active, type the following command as root:

service portmap status
  • If the portmap service status is running, then
    • the nfs service can be started with:service nfs start
    • the nfslock service can be started with:service nfslock start.
  • Else execute: service portmap start and after successful report,
    • the nfs service can be started with:service nfs start
    • the nfslock service can be started with:service nfslock start.
Note-icon.png
  
By default, the nfs service does not start automatically at boot time. To configure the NFS to start up at boot time, use an initscript utility, such as /sbin/chkconfig, /sbin/ntsysv, or the Services Configuration Tool program.


Initial test

Verify that all necessary daemons are running. Use rpcinfo -p

# should be something like this: 
program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp    719  status
    100024    1   tcp    722  status
    100011    1   udp    847  rquotad
    100011    2   udp    847  rquotad
    100011    1   tcp    850  rquotad
    100011    2   tcp    850  rquotad
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100021    1   udp  32775  nlockmgr
    100021    3   udp  32775  nlockmgr
    100021    4   udp  32775  nlockmgr
    100021    1   tcp  32789  nlockmgr
    100021    3   tcp  32789  nlockmgr
    100021    4   tcp  32789  nlockmgr
    100005    1   udp    863  mountd
    100005    1   tcp    866  mountd
    100005    2   udp    863  mountd
    100005    2   tcp    866  mountd
    100005    3   udp    863  mountd
    100005    3   tcp    866  mountd


Update

There are some software managers (e.g. yum, yast) for operating systems which do the job well for update and new installation for packages. Please see the appropriate attributes for current task in the manuals for them (use man yum).

Personal tools