13
Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html 1 of 5 27/03/2007 9:16 Red Hat Enterprise Linux 3: Manual de referencia Anterior Capítulo 9. Sistema de archivos de red (NFS) Siguiente 9.3. Configuración del servidor NFS Existen tres formas de configurar un servidor NFS bajo Red Hat Enterprise Linux: usando la Herramienta de configuración del servidor NFS (redhat-config-nfs), modificando manualmente su archivo de configuración ( /etc/exports), o utilizando el comando /usr/sbin/exportfs. Para las instrucciones sobre como utilizar Herramienta de configuración del servidor NFS, consulte el capítulo llamado Sistemas de archivo de red (NFS) en el Manual de administración del sistema de Red Hat Enterprise Linux . El resto de esta sección discute la modificación manual de /etc/exports y el uso del comando /usr/sbin/exportfs para exportar sistemas de archivos NFS. 9.3.1. Archivo de configuración del servidor NFS El archivo /etc/exports controla cuáles sistemas de archivos son exportados a las máquinas remotas y especifica opciones. Las líneas en blanco son ignoradas, se pueden comentar líneas con el símbolo # y las líneas largas pueden ser divididas con una barra invertida (\). Cada sistema de archivos exportado debe tener su propia línea y cualquier lista de hosts autorizadas colocada después de un sistema de archivos exportado, debe estar separada por un espacio. Las opciones para cada uno de los hosts deben ser colocadas entre paréntesis directamente detrás del identificador del host, sin ningún espacio de separación entre el host y el primer paréntesis. Una línea para un sistema de archivos exportado tiene la estructura siguiente: <export> <host1>(<options>) <hostN>(<options>)... En esta estructura, reemplace <export> con el directorio a exportar, reemplace <host1> con el host o la red a la cual está siendo compartida la exportación y reemplace <options> con las opciones para cada host o red. Los hosts adicionales se pueden especificar en una lista separada por espacios. Se pueden usar los métodos siguientes para especificar nombres de host: una sola máquina — Cuando una máquina en particular es especificada con nombre completo de dominio, nombre de máquina o dirección IP. comodines — Usamos un carácter * o ? para referirnos a un grupo de nombres completos de dominio o direcciones IP o que coincidan con una cadena particular de letras. Los comodines no son usados con direcciones IP; sin embargo, es posible para estos funcionar accidentalmente si fallan las búsquedas de DNS inversas. Tenga cuidado cuando especifique comodines con nombres de dominio

Configuración del servidor NFS

Embed Size (px)

Citation preview

Page 1: Configuración del servidor NFS

Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html

1 of 5 27/03/2007 9:16

Red Hat Enterprise Linux 3: Manual de referenciaAnterior Capítulo 9. Sistema de archivos de red (NFS) Siguiente

9.3. Configuración del servidor NFSExisten tres formas de configurar un servidor NFS bajo Red Hat Enterprise Linux: usando la Herramienta de configuración del servidor NFS (redhat-config-nfs), modificando manualmente su archivo de configuración (/etc/exports), o utilizando el comando /usr/sbin/exportfs.

Para las instrucciones sobre como utilizar Herramienta de configuración delservidor NFS, consulte el capítulo llamado Sistemas de archivo de red (NFS) en elManual de administración del sistema de Red Hat Enterprise Linux . El resto de esta sección discute la modificación manual de /etc/exports y el uso delcomando /usr/sbin/exportfs para exportar sistemas de archivos NFS.

9.3.1. Archivo de configuración del servidor NFSEl archivo /etc/exports controla cuáles sistemas de archivos son exportados a lasmáquinas remotas y especifica opciones. Las líneas en blanco son ignoradas, sepueden comentar líneas con el símbolo # y las líneas largas pueden ser divididas conuna barra invertida (\). Cada sistema de archivos exportado debe tener su propialínea y cualquier lista de hosts autorizadas colocada después de un sistema dearchivos exportado, debe estar separada por un espacio. Las opciones para cada uno de los hosts deben ser colocadas entre paréntesis directamente detrás delidentificador del host, sin ningún espacio de separación entre el host y el primerparéntesis.

Una línea para un sistema de archivos exportado tiene la estructura siguiente:

<export> <host1>(<options>) <hostN>(<options>)...

En esta estructura, reemplace <export> con el directorio a exportar, reemplace <host1> con el host o la red a la cual está siendo compartida la exportación yreemplace <options> con las opciones para cada host o red. Los hosts adicionalesse pueden especificar en una lista separada por espacios.

Se pueden usar los métodos siguientes para especificar nombres de host:

una sola máquina — Cuando una máquina en particular es especificada connombre completo de dominio, nombre de máquina o dirección IP.

comodines — Usamos un carácter * o ? para referirnos a un grupo de nombrescompletos de dominio o direcciones IP o que coincidan con una cadena particular de letras. Los comodines no son usados con direcciones IP; sin embargo, es posible para estos funcionar accidentalmente si fallan lasbúsquedas de DNS inversas.

Tenga cuidado cuando especifique comodines con nombres de dominio

Page 2: Configuración del servidor NFS

Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html

2 of 5 27/03/2007 9:16

completos, pues tienden a ser más exactos de lo que usted cree. Por ejemplo,el uso de *.example.com como comodín, permitirá a ventas.domain.comacceder al sistema de archivos exportado, pero no a bob.ventas.domain.com. Para permitir ambas posibilidades, debería usar *.example.com y también*.*.example.com

redes IP — Permite la coincidencia de hosts basados en sus direcciones IPdentro de una red más grande. Por ejemplo, 192.168.0.0/28 permite al acceso a las primeras 16 direcciones IP, desde la 192.168.0.0 a la 192.168.0.15, acceder al sistema de archivos exportado, pero no a la 192.168.0.16 y superiores.

grupos de redes — Permite usar un nombre de grupo de red NIS, escrito como@<group-name>. Esto pone al servidor NIS controlando el acceso de este sistema de archivos, donde los usuarios pueden ser añadidos o borrados de ungrupo NIS sin que afecte a /etc/exports.

En su forma más sencilla, /etc/exports sólo necesita saber el directorio aexportar y los hosts que pueden usarlo, como en el ejemplo siguiente:

/exported/directory bob.example.com

En el ejemplo, bob.example.com puede montar /exported/directory/. Como nose especifica ninguna opción en este ejemplo, tomarán efecto las siguientesopciones predeterminadas de NFS:

ro — Se montan los sistemas de archivos como de sólo lectura (read-only).Los host remotos no pueden hacer cambios a los datos compartidos en elsistema de archivos. Para permitir que los hosts puedan hacer cambios, debeespecificar la opción rw (lectura-escritura, read-write).

async — Permite al servidor escribir los datos en el disco a intervalosirregulares. Esta configuración funciona mejor si el sistema de archivosexportado es de sólo lectura. Si el sistema de archivos de lectura/escritura y loshosts están haciendo cambios al sistema de archivos cuando el servidor se caeo se apaga, se pueden perder datos. Especificando la opción sync, todas las escrituras en el disco se efectúan antes de que la petición de escritura delcliente se haya completado. Sin embargo, la opción sync, puede que disminuya el rendimiento.

wdelay — Provoca que el servidor NFS retrase el escribir a disco si sospechaque otra petición de escritura es inminente. Esto puede mejorar el rendimientoreduciendo las veces que se debe acceder al disco por comandos de escrituraseparados. Use no_wdelay para desactivar esta opción, la cual sólo funcionasi está usando la opción sync.

root_squash — Prevents root users connected remotely from having root

Page 3: Configuración del servidor NFS

Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html

3 of 5 27/03/2007 9:16

privileges and assigns them the user ID for the user nfsnobody. This effectively "squashes" the power of the remote root user to the lowest local user, preventing unauthorized alteration of files on the remote server. Alternatively, the no_root_squash option turns off root squashing. To squash every remote user, including root, use the all_squash option. To specify the user and groupIDs to use with remote users from a particular host, use the anonuid and anongid options, respectively. In this case, a special user account can be created for remote NFS users to share and specify (anonuid=<uid-value>,anongid=<gid-value>), where <uid-value>is the user ID number and <gid-value> is the group ID number.

Importante

Por defecto, las listas de control de acceso (ACLs) son soportadas por NFS bajo Red Hat Enterprise Linux. Para desactivar esta funcionalidad, especifique la opción no_acl cuando esté exportando elsistema de archivos. Para más información sobre esta funcionalidad,vea el capítulo Sistemas de archivo de red (NFS) en el Manual deadministración del sistema de Red Hat Enterprise Linux.

Cada valor predeterminado para un sistema de archivos exportado debe serexplícitamente ignorado. Por ejemplo, si no se especifica la opción rw, entonces el sistema de archivos es exportado como de sólo lectura. Lo siguiente es una línea demuestra de /etc/exports la cual sobreescribe dos opciones predeterminadas:

/another/exported/directory 192.168.0.3(rw,sync)

En este ejemplo 192.168.0.3 puede montar /another/exported/directory/como lectura/escritura y todas las transferencias al disco son efectuadas antes de completar la petición de escritura del cliente.

Adicionalmente, hay otra opciones que están disponibles que no tienen especificadoun valor predeterminado. Estas incluyen la habilidad de desactivar la verificación porsubdirectorios, permitir el acceso desde puertos inseguros y permitir bloquear archivos inseguros (necesario para algunas implementaciones antiguas de clientes NFS). Vea la página man de exports para estas opciones menos usadas.

Aviso

La manera en que el archivo /etc/exports está organizado es muyimportante, particularmente lo que concierne a los espacios en blanco. Recuerde separar siempre los sistemas de archivos exportados de

Page 4: Configuración del servidor NFS

Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html

4 of 5 27/03/2007 9:16

una máquina a la otra, con un espacio. Sin embargo, no debería haberotros espacios en el archivo a menos que se usen en líneascomentadas.

Por ejemplo, las siguientes dos líneas significan cosas distintas:

/home bob.example.com(rw)/home bob.example.com (rw)

La primera línea permite sólo a los usuarios de bob.example.comacceder en modo de lectura/escritura al directorio /home. La segundalínea permite a los usuarios de bob.example.com montar el directorio de sólo lectura (el predeterminado), pero el resto del mundopuede instalarlo como lectura/escritura.

Para instrucciones detalladas sobre la configuración de un servidor NFS modificando/etc/exports, consulte el capítulo titulado Sistemas de archivos de red (NFS) enel Manual de administración del sistema de Red Hat Enterprise Linux .

9.3.2. El comando exportfs

Cada sistema de archivos que se exporta a usuarios remotos a través de NFS, asícomo los niveles de acceso relativos a ellos, son listados en el archivo /etc/exports. Cuando comienza el servicio nfs, el comando /usr/sbin/exportfslanza y lee este archivo y pasa a rpc.mountd y a rpc.nfsd los sistemas de archivos disponibles a los usuarios remotos.

Cuando se ejecuta manualmente, el comando /usr/sbin/exportfs permite al usuario root exportar o no directorios concretos sin reiniciar los servicios NFS. Cuando se le pasan las opciones apropiadas, el comando /usr/sbin/exportfs escribe los sistemas de archivos exportados a /var/lib/nfs/xtab. Como rpc.mountd se refiere al archivo xtab para decidir privilegios de acceso a un sistema de archivos, los cambios en la lista de sistemas de archivos exportados toman efecto inmediatamente.

Lo siguiente es una lista de las opciones más comunes disponibles para/usr/sbin/exportfs:

-r — Provoca que todos los directorios listados en /etc/exports sean exportados construyendo una nueva lista de exportación en/etc/lib/nfs/xtab. Esta opción refresca la lista de exportación concualquier cambio que hubiéramos realizado en /etc/exports.

-a — Provoca que todos los directorios sean exportados o no, dependiendo dequé otras opciones hemos pasado a /usr/sbin/exportfs. Si no se pasan otras opciones, /usr/sbin/exportfs exporta todos los sistemas de archivos

Page 5: Configuración del servidor NFS

Configuración del servidor NFS http://web.mit.edu/rhel-doc/3/rhel-rg-es-3/s1-nfs-server-export.html

5 of 5 27/03/2007 9:16

especificados en /etc/exports.

-o file-systems — Permite especificar directorios a exportar que no esténlistados en /etc/exports. Reemplace file-systems con los sistemas de archivos adicionales a exportar. Estos sistemas de archivos deben tener elmismo formato en que fueron especificados en /etc/exports. Consulte la Sección 9.3.1 para más información sobre la sintaxis de /etc/exports. Estaopción es usada para probar un sistema de archivos antes de añadirlopermanentemente a la lista de sistemas a exportar.

-i — Ignora /etc/exports; sólo las opciones dadas desde la línea decomandos son usadas para definir los sistemas de archivos exportados.

-u — No exporta todos los directorios compartidos. El comando/usr/sbin/exportfs -ua suspende la compartición de archivos NFS mientras quemantiene todos los demonios NFS activos. Para reactivar la compartición NFS,teclee exportfs -r.

-v — Operación descriptiva, donde los sistemas de archivos exportados odejados de exportar son mostrados en gran detalle al ejecutarse el comandoexportfs.

Si no se pasan opciones al comando /usr/sbin/exportfs, mostrará una lista de lossistemas de archivos actualmente exportados.

Para más información sobre /usr/sbin/exportfs, vaya a la página man de exportfs.

Anterior Inicio SiguienteIniciar y detener NFS Subir Archivos de configuración

de clientes NFS

Page 6: Configuración del servidor NFS

NFS Client Configuration Files http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-gui...

1 of 4 27/03/2007 9:16

Search Docs: Go

Red Hat Docs > Manuals > Red Hat Linux Manuals > Red Hat Linux 9 >

Red Hat Linux 9: Red Hat Linux Reference GuidePrev Chapter 9. Network File System (NFS) Next

9.3. NFS Client Configuration FilesAny NFS share made available by a server can be mounted using various methods.The share can be manually mounted, using the mount command. However, thisrequires that the root user type the mount command every time the system restarts.Two methods of configuring NFS shares to be mounted automatically at boot timeinclude modifying the /etc/fstab or using the autofs service.

9.3.1. /etc/fstabPlacing a properly formatted line in the /etc/fstab file has the same effect asmanually mounting the exported file system. The /etc/fstab file is read by the /etc/rc.d/init.d/netfs script at system startup and any NFS shares listedthere will be mounted.

A sample /etc/fstab line to mount an NFS export looks like the following:

<server>:</path/of/dir> </local/mnt/point> nfs <options> 0 0

The <server-host> corresponds to hostname, IP address, or fully qualified domainname of the server exporting the file system.

The </path/of/directory> is the path to the exported directory.

The </local/mount/point> specifies where on the local file system to mount theexported directory. This mount point must exist before /etc/fstab is read or the mount will fail.

The nfs option specifies the type of file system being mounted.

The <options> area specifies mount options for the file system. For example, if theoptions area states rw,suid, the exported file system will be mounted read-write andthe user and groupid set by the server will be used. Note that parentheses are not tobe used here. For more mount options, see Section 9.3.3 Common NFS Mount Options.

9.3.2. autofs

One drawback to using /etc/fstab is that, regardless of how infrequently a user

Page 7: Configuración del servidor NFS

NFS Client Configuration Files http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-gui...

2 of 4 27/03/2007 9:16

may access the NFS mounted file system, the system must dedicate resources tokeep that mount in place. This is not a problem with one or two mounts, but when thesystem is maintaining mounts to a dozen systems at one time, overall systemperformance can suffer. An alternative to /etc/fstab is to use the kernel-basedautomount utility, which will mount and unmount NFS file systems automatically,saving resources.

The autofs script, located in the /etc/rc.d/init.d/ directory, is used to controlautomount through the /etc/auto.master primary configuration file. Whileautomount can be specified on the command line, it is more convenient to specify themount points, hostname, exported directory, and options in a set of files rather thantyping them all by hand. By running autofs as a service that starts and stops indesignated runlevels, the mount configurations in the various files can beautomatically implemented.

The autofs configuration files are arranged in a parent-child relationship. A mainconfiguration file (/etc/auto.master) refers mount points on your system that arelinked to a particular map type, which take the form of other configuration files,programs, NIS maps, and other less common mount methods. The auto.masterfile contains lines referring to each of these mount points, organized like this:

<mount-point> <map-type>

The <mount-point> element of this line indicates the location of the mount on thelocal file system. The <map-type> relates to the way in which the mount point will bemounted. The most common method for auto mounting NFS exports is to use a fileas the map type for the particular mount point. The map file, usually namedauto.<mount-point>, where <mount-point> is the mount point designated inauto.master, contains lines that look like this:

<directory> <mount-options> <host>:<exported-file-system>

The <directory> refers to the directory within the mount point where the exportedfile system should be mounted. Much like a standard mount command, the host exporting the file system, as well as the file system being exported, are required in the<host>:<exported-file system> section. To specify particular options to beused when mounting the exported file system, place them in the <mount-options>section, separated by commas. For NFS mounts that use autofs, place -fstype=nfs in the <mount-options> section.

While autofs configuration files can be used for a variety of mounts to many types ofdevices and file systems, they are particularly useful in creating NFS mounts. Forexample, some organizations store a user's /home/ directory on a central server viaan NFS share. Then, they configure the auto.master file on each of the

Page 8: Configuración del servidor NFS

NFS Client Configuration Files http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-gui...

3 of 4 27/03/2007 9:16

workstations to point to an auto.home file containing the specifics for how to mountthe /home/ directory via NFS. This allows the user to access personal data andconfiguration files in their /home/ directory by logging in anywhere on the internalnetwork. The auto.master file in this situation would look similar to this:

/home /etc/auto.home

This sets up the /home/ mount point on the local system to be configured by the/etc/auto.home file, which may look similar to this:

* -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid server.example.com:/home

This line states that any directory a user tries to access under the local /home/directory (due to the asterisk character) should result in an NFS mount on theserver.example.com system within its exported /home/ file system. The mountoptions specify that each /home/ directory NFS mounts should use a particularcollection of settings. For more information on mount options, including the ones usedin this example, see Section 9.3.3 Common NFS Mount Options.

9.3.3. Common NFS Mount OptionsBeyond mounting a file system via NFS on a remote host, a number of differentoptions may be specified at the time of the mount that can make it easier to use.These options can be used with manual mount commands, /etc/fstab settings,and autofs, and other mounting methods.

The following options are the most popular for NFS mounts:

hard or soft — specifies whether the program using a file via an NFSconnection should stop and wait (hard) for the server to come back online if thehost serving the exported file system is unavailable, or if it should report an error(soft).

If hard is specified, the user cannot terminate the process waiting for the NFScommunication to resume unless intr option is also specified.

If soft, is specified, the user can set an additional timeo=<value> option,where <value> specifies the number of seconds to pass before the error isreported.

intr — allows NFS requests to be interrupted if the server goes down orcannot be reached.

nolock — is occasionally required when connecting to older NFS server. Torequire locking, use the lock option.

Page 9: Configuración del servidor NFS

NFS Client Configuration Files http://www.redhat.com/docs/manuals/linux/RHL-9-Manual/ref-gui...

4 of 4 27/03/2007 9:16

noexec — does not permit the execution of binaries on the mounted filesystem. This is useful if the system is mounting a non-Linux file system via NFSthat contains incompatible binaries.

nosuid — does not allow set-user-identifier or set-group-identifier bits to takeeffect.

rsize=8192 and wsize=8192 — may speed up NFS communication forreads (rsize) and writes (wsize) by setting a larger data block size, in bytes,to be transferred at one time. Be careful when changing these values; someolder Linux kernels and network cards may not work well with larger block sizes.

nfsvers=2 or nfsvers=3 — specify which version of the NFS protocol to use.

Many more options are listed on the mount man page, including options for mountingnon-NFS file systems.

Prev Home NextNFS Server ConfigurationFiles

Up Securing NFS

Page 10: Configuración del servidor NFS

Mounting NFS File Systems http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/...

1 of 4 27/03/2007 9:16

Search Docs: Go

Red Hat Docs > Manuals > Red Hat Enterprise Linux Manuals >

Red Hat Enterprise Linux 3: System Administration GuidePrev Chapter 23. Network File System (NFS) Next

23.2. Mounting NFS File SystemsUse the mount command to mount a shared NFS directory from another machine:

mount shadowman.example.com:/misc/export /misc/local

Warning

The mount point directory on local machine (/misc/local in the above example) must exist.

In this command, shadowman.example.com is the hostname of the NFS file server,/misc/export is the directory that shadowman is exporting, and /misc/local is the location to mount the file system on the local machine. After the mount command runs (and if the client has proper permissions from the shadowman.example.comNFS server) the client user can execute the command ls /misc/local to display alisting of the files in /misc/export on shadowman.example.com.

23.2.1. Mounting NFS File Systems using /etc/fstabAn alternate way to mount an NFS share from another machine is to add a line to the/etc/fstab file. The line must state the hostname of the NFS server, the directoryon the server being exported, and the directory on the local machine where the NFSshare is to be mounted. You must be root to modify the /etc/fstab file.

The general syntax for the line in /etc/fstab is as follows:

server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr

The mount point /pub must exist on the client machine. After adding this line to/etc/fstab on the client system, type the command mount /pub at a shellprompt, and the mount point /pub will be mounted from the server.

Page 11: Configuración del servidor NFS

Mounting NFS File Systems http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/...

2 of 4 27/03/2007 9:16

23.2.2. Mounting NFS File Systems using autofsA third option for mounting an NFS share is the use of autofs. Autofs uses theautomount daemon to manage your mount points by only mounting them dynamicallywhen they are accessed.

Autofs consults the master map configuration file /etc/auto.master to determine which mount points are defined. It then starts an automount process with theappropriate parameters for each mount point. Each line in the master map defines amount point and a separate map file that defines the file systems to be mountedunder this mount point. For example, the /etc/auto.misc file might define mount points in the /misc directory; this relationship would be defined in the/etc/auto.master file.

Each entry in auto.master has three fields. The first field is the mount point. Thesecond field is the location of the map file, and the third field is optional. The thirdfield can contain information such as a timeout value.

For example, to mount the directory /proj52 on the remote machinepenguin.example.net at the mount point /misc/myproject on your machine, add the following line to auto.master:

/misc /etc/auto.misc --timeout 60

Add the following line to /etc/auto.misc:

myproject -rw,soft,intr,rsize=8192,wsize=8192 penguin.example.net:/proj52

The first field in /etc/auto.misc is the name of the /misc subdirectory. Thisdirectory is created dynamically by automount. It should not actually exist on the clientmachine. The second field contains mount options such as rw for read and writeaccess. The third field is the location of the NFS export including the hostname anddirectory.

Note

The directory /misc must exist on the local file system. There shouldbe no subdirectories in /misc on the local file system.

Autofs is a service. To start the service, at a shell prompt, type the followingcommands:

Page 12: Configuración del servidor NFS

Mounting NFS File Systems http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/...

3 of 4 27/03/2007 9:16

/sbin/service autofs restart

To view the active mount points, type the following command at a shell prompt:

/sbin/service autofs status

If you modify the /etc/auto.master configuration file while autofs is running, youmust tell the automount daemon(s) to reload by typing the following command at ashell prompt:

/sbin/service autofs reload

To learn how to configure autofs to start at boot time, refer to Chapter 21 Controlling Access to Services for information on managing services.

23.2.3. Using TCPThe default transport protocol for NFS is UDP; however, the Red Hat Enterprise Linux3 kernel includes support for NFS over TCP. To use NFS over TCP, include the -o tcp option to mount when mounting the NFS-exported file system on the clientsystem. For example:

mount -o tcp shadowman.example.com:/misc/export /misc/local

If the NFS mount is specified in /etc/fstab:

server:/usr/local/pub /pub nfs rsize=8192,wsize=8192,timeo=14,intr,tcp

If it is specified in an autofs configuration file:

myproject -rw,soft,intr,rsize=8192,wsize=8192,tcp penguin.example.net:/proj52

Since the default is UDP, if the -o tcp option is not specified, the NFS-exported filesystem is accessed via UDP.

The advantages of using TCP include the following:

Page 13: Configuración del servidor NFS

Mounting NFS File Systems http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/...

4 of 4 27/03/2007 9:16

Improved connection durability, thus less NFS stale file handles messages.

Performance gain on heavily loaded networks because TCP acknowledgesevery packet, unlike UDP which only acknowledges completion.

TCP has better congestion control than UDP (which has none). On a verycongested network, UDP packets are the first types of packet that are dropped.Which means if NFS is writing data (in 8K chunks) all of that 8K has toretransmitted. With TCP because of its reliability, one parts of that 8K data istransmitted at a time.

Error detection. When a tcp connection breaks (due to the server going down)the client stops sending data and starts the reconnection process. With UDP,since its connection-less, the client continue to pound the network with data untilserver comes up.

The main disadvantage is that there is a very small performance hit due to theoverhead associated with the TCP protocol.

23.2.4. Preserving ACLsThe Red Hat Enterprise Linux 3 kernel provides ACL support for the ext3 file systemand ext3 file systems mounted with the NFS or Samba protocols. Thus, if an ext3 filesystem has ACLs enabled for it and is NFS exported, if the NFS client can readACLs, they are used by the NFS client as well.

For more information about mounting NFS file systems with ACLs, refer to Chapter 8 Access Control Lists.

Prev Home NextNetwork File System (NFS) Up Exporting NFS File Systems