HP Visualize c160L IRIX to HP-UX Migration Guide - Page 104

Configuring and Administering an NFS Client

Page 104 highlights

Network File System 4. If your server will be down for a long time, edit the /etc/fstab file on each client to comment out or remove any NFS mounts from the server you are planning to disable. This prevents the clients from attempting to mount directories from your server when the clients are rebooted. 5. If your server will be down for a long time, edit the /etc/auto_* files on each client to comment out or remove any automounts from the server you are planning to disable. Clients that automount the server's directories might not be listed by the showmount command. If you are using NIS to manage your automounter maps, edit the /etc/auto_* files on the NIS master server, and then issue the following commands to regenerate the maps and push them to the slave servers: # cd /var/yp # /usr/ccs/bin/make auto.mapname auto.mapname... 6. If you modified any direct automounter maps or the automounter master map, restart the automounter. 7. Issue the following command on the server to unexport all exported directories: # /usr/sbin/exportfs -au 8. On the NFS server, edit the /etc/rc.config.d/nfsconf file to set the NFS_SERVER variable to 0.This prevents the NFS server daemons from starting up when your system reboots. If your server will be down only a short time, this step is unnecessary. NFS_SERVER=0 9. Edit the /etc/inetd.conf file to comment out the line that contains rpc.mountd (if it exists) and the lines for the other RPC services. 10. Issue the following command to disable NFS server capability: # /sbin/init.d/nfs.server stop If your NFS server will be down for a short time, this procedure is not necessary. If the server is down for only a few minutes, and directories are hard-mounted on the clients, clients attempting access to the server will simply hang until it comes back up. Then, they will resume access to it as if nothing had happened. However, if the server will be down for a long time, NFS clients attempting access to it will have to interrupt their attempts, usually with [CTRL]-C. If directories are mounted with the nointr option, clients must reboot their systems in order to stop trying to access a down server. Configuring and Administering an NFS Client To Mount a Remote Directory Using a Standard NFS Mount 1. In the /etc/fstab file, use a text editor to add a line for each remote directory you want mounted on your system. If the /etc/fstab file does not exist, you will have to create it. A line in the /etc/fstab file has the following syntax: server:remote_directory local_directory nfs defaults 0 0 server:remote_directory local_directory nfs option[,option...] 0 0 2. If your system is already running as an NFS client, issue the following command to mount each remote directory you have added to the /etc/fstab file: # /usr/sbin/mount local_directory 99

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Network File System
99
4.
If your server will be down for a long time, edit the
/etc/fstab
file on each client to comment out or
remove any NFS mounts from the server you are planning to disable. This prevents the clients from
attempting to mount directories from your server when the clients are rebooted.
5.
If your server will be down for a long time, edit the
/etc/auto_*
files on each client to comment out or
remove any automounts from the server you are planning to disable. Clients that automount the
serverĀ±s directories might not be listed by the
showmount
command.
If you are using NIS to manage your
automounter
maps, edit the
/etc/auto_*
files on the NIS master
server, and then issue the following commands to regenerate the maps and push them to the slave
servers:
# cd /var/yp
# /usr/ccs/bin/make auto.mapname auto.mapname...
6.
If you modified any direct
automounter
maps or the
automounter
master map, restart the
automounter.
7.
Issue the following command on the server to unexport all exported directories:
# /usr/sbin/exportfs -au
8.
On the NFS server, edit the
/etc/rc.config.d/nfsconf
file to set the
NFS_SERVER
variable to
0
.This
prevents the NFS server daemons from starting up when your system reboots. If your server will be
down only a short time, this step is unnecessary.
NFS_SERVER=0
9.
Edit the
/etc/inetd.conf
file to comment out the line that contains
rpc.mountd
(if it exists) and the
lines for the other RPC services.
10. Issue the following command to disable NFS server capability:
# /sbin/init.d/nfs.server stop
If your NFS server will be down for a short time, this procedure is not necessary. If the server is down for
only a few minutes, and directories are hard-mounted on the clients, clients attempting access to the server
will simply hang until it comes back up. Then, they will resume access to it as if nothing had happened.
However, if the server will be down for a long time, NFS clients attempting access to it will have to
interrupt their attempts, usually with
[CTRL]-C
. If directories are mounted with the
nointr
option, clients
must reboot their systems in order to stop trying to access a down server.
Configuring and Administering an NFS Client
To Mount a Remote Directory Using a Standard NFS Mount
1.
In the
/etc/fstab
file, use a text editor to add a line for each remote directory you want mounted on
your system. If the
/etc/fstab
file does not exist, you will have to create it. A line in the
/etc/fstab
file
has the following syntax:
server:remote_directory local_directory nfs defaults 0 0
server:remote_directory local_directory nfs option[,option...] 0 0
2.
If your system is already running as an NFS client, issue the following command to mount each remote
directory you have added to the
/etc/fstab
file:
# /usr/sbin/mount local_directory