Sunteți pe pagina 1din 6

Configuration

The Configuration File Explained

The main NFS configuration file is

/etc/rc.config.d/nfsconf

This is a user-editable file, so it is NOT overwritten by patches. So, if a patch is installed


which contains a newer version of this file, the system administrator must backup the
original, copy the new file from /usr/newconfig/etc/rc.config.d/nfsconf, and then apply
the same changes they have already made to the new version.

Here are the configurable parameters, their default values, and what they do:

NFS_CLIENT=1

If this is set to 1, this system is considered an NFS client. At startup, the system will run
rpcbind, the configured number of biod's, rpc.statd, rpc.lockd, and AutoFS or legacy
automounter (if configured)

[ top ]

NFS_SERVER=0

If this is set to 1, this system is considered an NFS server. At startup, the system will run
rpcbind, rpc.mountd, the configured* number of nfsd's, rpc.statd, rpc.lockd, and
rpc.pcnfsd (if configured as a PCNFS_SEVER).

[ top ]

NUM_NFSD=4

This is the number of nfsd's (server-side daemons) which are started when the NFS server
is started. There must be at least one nfsd per CPU, and the number of nfsd's must be a
multiple of the number of CPU's. For example: if a system has 12 CPU's and
NUM_NFSD=8, then we will automatically (and silently) start 12 nfsd's. If, on the same
system, NUM_NFSD=14, we would start 24.

[ top ]

NUM_NFSIOD=4

This is the number of biod's (client-side daemons) which are started when the NFS client
is started.
[ top ]

PCNFS_SERVER=0

If this is set to 1, this system is considered to be a server to PCNFS clients. At the startup
of the NFS server, this will cause us to run rpc.pcnfsd.

[ top ]

LOCKD_OPTIONS=""

These are options passed to rpc.lockd when it is started by the NFS client or server
scripts. Not all lockd options can be passed via the config file, however. Some options
may cause the startup script to hang.

[ top ]

STATD_OPTIONS=""

These are options passed to rpc.statd when it is started by the NFS client or server
scripts. Not all statd options can be passed via the config file, however. Some options
may cause the startup script to hang.

[ top ]

MOUNTD_OPTIONS=""

These are options passed to rpc.mountd when it is started by the NFS server script. Not
all mountd options can be passed via the config file, however. Some options may cause
the startup script to hang.

[ top ]

AUTOMOUNT=1

If this is set to 1, this system will run either AutoFS or the legacy automounter. The
selection is determined by the setting of AUTOFS=n

[ top ]

AUTO_MASTER="/etc/auto_master"

The master automount map file to be used by AutoFS or legacy automounter.

[ top ]

AUTO_OPTIONS="-f $AUTO_MASTER"
This is passed to AutoFS. You can see that it is sourced from the above variable.

[ top ]

START_MOUNTD=1

This tells the system to start rpc.mountd when the NFS server is started. An alternative,
but not recommended, method of running rpc.mountd would be via inetd.

[ top ]

AUTOFS=0

If this is set to 1, and AUTOMOUNT=1, this system is considered to be an AutoFS client


and automountd is started when the NFS client is started via the nfs.client script.

[ top ]

AUTOMOUNT_OPTIONS=""

These are options passed to the automount command at startup. Do not confuse these
with options passed to the daemon, automountd.

[ top ]

AUTOMOUNTD_OPTIONS=""

These are the options passed to the AutoFS daemon, automountd. Do not confuse these
with options passed to the automount command.

[ top ]

NFS_TCP=1

This is only on 11.00 systems where support for NFS over TCP has been added. If it is
set to 1, this system is considered to be able to run NFS over TCP.

[ top ]

LOCKD_PORT=4045

This fixes the port on which rpc.lockd will listen. This is a new feature that is used to fix
the port so that a firewall or other port filtering software can be easily configured to allow
NLM traffic to pass through. Beginning with HP-UX 11.31, this will be hard-coded at
4045, and not configurable.

[ top ]
STATD_PORT=4046

This fixes the port on which rpc.statd will listen. This is a new feature that is used to fix
the port so that a firewall or other port filtering software can be easily configured to allow
NSM traffic to pass through. This port will remain configurable for the foreseeable
future.

[ top ]

MOUNTD_PORT=4047

This fixes the port on which rpc.mountd will listen. This is a new feature that is used to
fix the port so that a firewall or other port filtering software can be easily configured to
allow MOUNT traffic to pass through. This port will remain configurable for the
foreseeable future.

[ top ]

For additional information about the configurable parameters in this file, please refer to
the file itself.

[ top ]

Client Configuration

The NFS client is configured by settting

NFS_CLIENT=1

in

/etc/rc.config.d/nfsconf

You may also with to set other options which are described above.

[ top ]

Server Configuration

The NFS server is configured by setting

NFS_SERVER=1

in

/etc/rc.config.d/nfsconf
You may also with to set other options which are described above.

[ top ]

AutoFS and Legacy Automounter Configuration

AutoFS (client) is configured by setting

NFS_CLIENT=1
AUTOMOUNT=1
AUTOFS=1

Note: If you are configuring a client which is also a server of an HA_NFS


ServiceGuard package, it is very highly recommended to use the -L option for
automountd as follows:

AUTOMOUNTD_OPTIONS="-L"

in

/etc/rc.config.d/nfsconf

[ top ]

The legacy automounter (discontinued at 11.31) is configured by setting. We do not


recommend using the legacy automounter other than for testing/troubleshooting purposes.

NFS_CLIENT=1
AUTOMOUNT=1
AUTOFS=0

in

/etc/rc.config.d/nfsconf

[ top ]

PC-NFS Server Configuration

The PCNFS server is configured by setting

NFS_SERVER=1
PCNFS_SERVER=1

in

/etc/rc.config.d/nfsconf

[ top ]
Other Config Files Which Affect NFS
/etc/shells (used by rpc.pcnfsd)
/etc/hosts
/etc/passwd
/etc/group
/etc/netgroup
/etc/nsswitch.conf
/etc/fstab
/etc/exports
/etc/auto* (if an automounter client)

[ top ]

Startup and Shutdown


Starting and stopping the NFS client

The NFS client should ONLY be stopped and started by the following commands:

/sbin/init.d/nfs.client stop
/sbin/init.d/nfs.client start

If any other method is used, problems such as commands hanging may occur and a
system reboot may be necessary. Caution should be used when stopping the NFS client.
Any users who are working over NFS should be notified so that they can complete their
work before the NFS client is stopped.

[ top ]

Starting and stopping the NFS server

The NFS server should ONLY be stopped and started by the following commands:

/sbin/init.d/nfs.server stop
/sbin/init.d/nfs.server start

If any other method is used, problems such as commands hanging may occur and a
system reboot may be necessary. Caution should be used when stopping the NFS server.
Any users who are working over NFS should be notified so that they can complete their
work before the NFS server is stopped.

S-ar putea să vă placă și