Linux : Montage NFS au démarrage
De www.yakakliker.org
Procédure pour créer un montage NFS automatique sous linux
- Installer le package commun NFS
apt-get install nfs-common
- Essayer le montage nfs avec la commande mount afin de valider le partage
mount -t nfs nfs xxx.xxx.xxx.xxx:/partage_nfs /dossier_local
- Renseignement de fstab afin d'assurer un montage automatique au démarrage
- xxx.xxx.xxx.xxx:/partage_nfs /dossier_local nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
auto: Mount automatically at bootnofail: Don’t halt boot process if mount failsnoatime: Don’t update access times (improves performance)nolock: Disable file locking (useful for certain applications)intr: Allow interrupts on hard mountstcp: Use TCP instead of UDPactimeo=1800: Cache attributes for 30 minutes
- xxx.xxx.xxx.xxx:/partage_nfs /dossier_local nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
- Recharger la configuration
systemctl daemon-reloadmount -a
Liens
https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04