Ceci est une ancienne révision du document !
Table des matières
Shares du NAS et configuration de linux
Configuration des UID et GID
Pour paramétrer correctement les groupes et les identifiants pour les droits d'accès les userid et les groupid doivent être identiques côté server et client.
Configuration du domaine
Le client et le serveur doivent être sur le même domaine.
Pour vérifier ça exécuter la commande
maitre@cahute:~$ sudo nfsidmap -d beafrancois.fr
Si ça n'est pas la même chose sur un des PC, il faut modifier le fichier /etc/hostname:
<hostname>.beafrancois.fr
montages bind
système
/mnt/stockage/system/mysql /var/lib/mysql none bind /mnt/stockage/system/gitea /var/lib/gitea none bind /mnt/stockage/system/web /var/www/html none bind
nfs
/mnt/stockage/multimedia /export/multimedia none bind /mnt/stockage/famille /export/famille none bind /mnt/stockage/partage /export/partage none bind /mnt/stockage/homes/beatrice /export/home/beatrice none bind /mnt/stockage/homes/francois /export/home/francois none bind
nfs
sur le nas les répertroires suivants sont exportés en nfs:
- /etc/exports
/export/famille 192.168.1.0/255.255.255.192(rw,insecure,no_subtree_check) /export/multimedia 192.168.1.0/255.255.255.192(rw,insecure,no_subtree_check) /export/partage 192.168.1.0/255.255.255.192(rw,insecure,no_subtree_check) /export/home/beatrice 192.168.1.0/255.255.255.192(rw,insecure,no_subtree_check) /export/home/francois 192.168.1.0/255.255.255.192(rw,insecure,no_subtree_check)
sur le nas config nfs:
- /etc/default/nfs-common
# If you do not set values for the NEED_ options, they will be attempted # autodetected; this should be sufficient for most people. Valid alternatives # for the NEED_ options are "yes" and "no". # Do you want to start the statd daemon? It is not needed for NFSv4. NEED_STATD="no" # Options for rpc.statd. # Should rpc.statd listen on a specific port? This is especially useful # when you have a port-based firewall. To use a fixed port, set this # this variable to a statd argument like: "--port 4000 --outgoing-port 4001". # For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS STATDOPTS= # Do you want to start the idmapd daemon? It is only needed for NFSv4. NEED_IDMAPD="yes" # Do you want to start the gssd daemon? It is required for Kerberos mounts. NEED_GSSD=
- /etc/default/nfs-kernel-server
# Number of servers to start up RPCNFSDCOUNT=8 # Runtime priority of server (see nice(1)) RPCNFSDPRIORITY=0 # Options for rpc.mountd. # If you have a port-based firewall, you might want to set up # a fixed port here using the --port option. For more information, # see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS # To disable NFSv4 on the server, specify '--no-nfs-version 4' here RPCNFSDOPTS="-N 2 -N 3" RPCMOUNTDOPTS="--manage-gids -N 2 - N 3" # Do you want to start the svcgssd daemon? It is only required for Kerberos # exports. Valid alternatives are "yes" and "no"; the default is "no". NEED_SVCGSSD="no" # Options for rpc.svcgssd. RPCSVCGSSDOPTS=""
Sur les clients linux
le fichier fstab ressemble à ça:
- /etc/fstab
cahute.beafrancois.fr:/export/multimedia /mnt/nas-multimedia nfs4 rw,sync,hard,intr 0 0 cahute.beafrancois.fr:/export/partage /mnt/nas-partage nfs4 rw,sync,hard,intr 0 0 cahute.beafrancois.fr:/export/famille /mnt/nas-famille nfs4 rw,sync,hard,intr 0 0 cahute.beafrancois.fr:/export/home/francois /mnt/francois/Nuage nfs4 rw,sync,hard,intr 0 0 cahute.beafrancois.fr:/export/home/beatrice /mnt/beatrice/Nuage nfs4 rw,sync,hard,intr 0 0
Sur les client wireguard
cahute.beafrancois.fr:/export/famille /mnt/nas-famille nfs4 user,noauto,x-systemd.automount,x-systemd.idle-timeout=60,_netdev,x-gvfs-show 0 0 cahute.beafrancois.fr:/export/partage /mnt/nas-partage nfs4 user,noauto,x-systemd.automount,x-systemd.idle-timeout=60,_netdev,x-gvfs-show 0 0 cahute.beafrancois.fr:/export/multimedia /mnt/nas-multimedia nfs4 user,noauto,x-systemd.automount,x-systemd.idle-timeout=60,_netdev,x-gvfs-show 0 0 cahute.beafrancois.fr:/export/home/francois /mnt/homes/francois nfs4 user,noauto,x-systemd.automount,x-systemd.idle-timeout=60,_netdev,x-gvfs-show 0 0 cahute.beafrancois.fr:/export/home/beatrice /mnt/homes/beatrice nfs4 user,noauto,x-systemd.automount,x-systemd.idle-timeout=60,_netdev,x-gvfs-show 0 0
</file>
