Mostra la pàginaRevisions anteriorsQuè hi enllaçaExporta a PDFTorna dalt Aquesta pàgina és només de lectura. Podeu veure'n el codi font, però no podeu canviar-la. Consulteu el vostre administrador si penseu que això és degut a algun error. = NFS == información * [[http://es.tldp.org/Manuales-LuCAS/GARL2/garl2/x-087-2-nfs.html]] * ''mount -t nfs nfs_volume local_dir options'' (se puede omitir ''-t nfs'' pq el formato de montaje es exclusivo de este protocolo) * ''mount -t nfs vlager:/home /users'' * ''cat /proc/filesystems'' -> ha de aparecer "nfs" == puesta en marcha de server/client * server : * configuración servicio:<code bash> sudo apt-get install nfs-kernel-server nfs-common portmap sudo vim /etc/exports # añadir el recurso, con parámetros y restricciones (según más abajo) sudo exportfs -ra sudo service nfs-kernel-server start # altertativamente: sudo systemctl restart nfs-kernel-server showmount -e </code> * configuración directorio compartido:<code bash> mkdir /path/directorio/compartido chown nobody:nogroup /path/directorio/compartido</code> * client : <code bash> sudo apt-get install nfs-common sudo /etc/hosts # añadir, opcionalmente, la IP de la máquina remota y su "alias" sudo mount -t nfs <ip>:<ruta> <ruta_local> </code> <code bash; /etc/fstab> <ip_NFS_server:/path/directorio/compartido /punto/montaje nfs rw,async,hard,intr,noexec 0 0 </code> * flags: * rw: Read/write filesystem. * ro: Read-only filesystem. Remote NFS clients can’t modify the filesystem. * hard: Applications using files stored on an NFS will always wait if the server goes down. User cannot terminate the process unless the option intr is set. * soft: Applications using files stored on an NFS will wait a specified time (using the timeo option) if the server goes down, and after that, will throw an error. * intr: Allows user interruption of processes waiting on a NFS request. * timeo=<num>: For use with the soft option. Specify the timeout for an NFS request. * nolock: Disable file locks. Useful with older NFS servers. * noexec: Disable execution of binaries or scripts on an NFS share. * nosuid: Prevents users from gaining ownership of files on the NFS share. * rsize=<num>: Sets the read block data size. Defaults to 8192 on NFSv2 and NFSv3, and 32768 on NFSv4. * wsize=<num>: Sets the write block data size. Defaults to 8192 on NFSv2 and NFSv3, and 32768 on NFSv4. == /etc/exports <code bash; /etc/exports> /path/directorio/compartir [<ip> | <rango_ip>]/<mascara>(flags) </code> * flags: * rw : lectura-escritura * ro : solo lectura * root_squash : impide que un cliente remoto con permiso ROOT pueda ejercerlos * subtree_check : Disable file location checks on partial volume exports. This option will speed up transfers on full volume exports. * sync : Force all transfers to operate in synchronous mode, so all clients will wait until their operations are really done. This can avoid data corruption in the event of a server crash. == apuntes * quien puede montar (**/etc/exports**) : <code bash; /etc/exports/>/carpeta ip/mask (ro,root_squad) @ trusted (rw,no_root_squad)</code> * AUTOFS daemon * /etc/auto.master == + info * [[https://www.linode.com/docs/networking/nfs/how-to-mount-nfs-shares-on-debian-9/]] * [[https://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/]] linux/tcpip/nfs.txt Darrera modificació: 14/08/2021 11:20per mate