GNU/Linux >> Tutoriels Linux >  >> Cent OS

Service d'exploitation Linux "nfslock"

Le système de fichiers réseau (NFS) est un protocole client/serveur qui permet à une hiérarchie de répertoires située sur un serveur NFS d'être montée sur un ou plusieurs clients NFS. Une fois cela fait, le client NFS peut accéder de manière transparente aux fichiers du serveur NFS. Les démons côté serveur NFS arbitrent l'accès simultané par plusieurs clients. Des fichiers entiers, ou des régions individuelles de fichiers, peuvent être verrouillés par un client pour éviter les conditions de concurrence causées par des modifications simultanées ou par l'affichage de mises à jour partielles.

Le démon nfslock permet de verrouiller des régions de fichiers NFS. Il est exécuté uniquement sur un serveur NFS; Les clients NFS n'ont pas besoin d'exécuter ce service. Ce service exécute le démon /sbin/rpc.lockd.

Contrôle des services

Comment démarrer ou arrêter immédiatement ce service :

# service nfslock  start
Starting NFS statd:                                        [  OK  ]
# service nfslock  stop
Stopping NFS locking:                                      [  OK  ]
Stopping NFS statd:                                        [  OK  ]

Comment contrôler le service lors des démarrages suivants :

# chkconfig --list nfslock
nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off

Autres possibilités :

# service nfslock
Usage: /etc/init.d/nfslock {start|stop|status|restart|reload|force-reload|probe|condrestart|try-restart|condstop}

La fonction de sonde est spéciale à ce service. La commande :

# service nfslock probe

renverra la chaîne "start " si le démon de verrouillage NFS n'est pas en cours d'exécution ou "redémarrer " s'il est en cours d'exécution.

Configuration

Le nom du package pour ce service est - nfs-utils . Le service peut être configuré en éditant le fichier /etc/sysconfig/nfs. Vous trouverez ci-dessous un exemple de fichier /etc/sysconfig/nfs.

# cat /etc/sysconfig/nfs
#
# Define which protocol versions mountd
# will advertise. The values are "no" or "yes"
# with yes being the default
#MOUNTD_NFS_V2="no"
#MOUNTD_NFS_V3="no"
#
#
# Path to remote quota server. See rquotad(8)
#RQUOTAD="/usr/sbin/rpc.rquotad"
# Port rquotad should listen on.
#RQUOTAD_PORT=875
# Optinal options passed to rquotad
#RPCRQUOTADOPTS=""
#
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
#LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
#LOCKD_UDPPORT=32769
#
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Turn off v2 and v3 protocol support
#RPCNFSDARGS="-N 2 -N 3"
# Turn off v4 protocol support
#RPCNFSDARGS="-N 4"
# Number of nfs server processes to be started.
# The default is 8.
#RPCNFSDCOUNT=8
# Stop the nfsd module from being pre-loaded
#NFSD_MODULE="noload"
# Set V4 and NLM grace periods in seconds
#
# Warning, NFSD_V4_GRACE should not be less than
# NFSD_V4_LEASE was on the previous boot.
#
# To make NFSD_V4_GRACE shorter, with active v4 clients,
# first make NFSD_V4_LEASE shorter, then restart server.
# This will make the clients aware of the new value.
# Then NFSD_V4_GRACE can be decreased with another restart.
#
# When there are no active clients, changing these values
# can be done in a single server restart.
#
#NFSD_V4_GRACE=90
#NFSD_V4_LEASE=90
#NLM_GRACE_PERIOD=90
#
#
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPCMOUNTDOPTS=""
# Port rpc.mountd should listen on.
#MOUNTD_PORT=892
#
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
#STATDARG=""
# Port rpc.statd should listen on.
#STATD_PORT=662
# Outgoing port statd should used. The default is port
# is random
#STATD_OUTGOING_PORT=2020
# Specify callout program
#STATD_HA_CALLOUT="/usr/local/bin/foo"
#
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
#RPCIDMAPDARGS=""
#
# Set to turn on Secure NFS mounts.
#SECURE_NFS="yes"
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
#RPCGSSDARGS=""
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
#RPCSVCGSSDARGS=""
#
# To enable RDMA support on the server by setting this to
# the port the server should listen on
#RDMA_PORT=20049


Cent OS
  1. Service d'exploitation Linux "sysstat"

  2. Service du système d'exploitation Linux "nfs"

  3. Service du système d'exploitation Linux 'microcode_ctl'

  4. Service d'exploitation Linux "hplip"

  5. Service d'exploitation Linux "irqbalance"

Service de système d'exploitation Linux « ldap »

Service d'exploitation Linux "yppasswdd"

Service d'exploitation Linux "xendomains"

Service de système d'exploitation Linux « nscd »

Service d'exploitation Linux "squid"

Service d'exploitation Linux "smartd"