Outils pour utilisateurs

Outils du site


tech:notes_nfs

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
tech:notes_nfs [2025/03/24 15:06] – créée - modification externe 127.0.0.1tech:notes_nfs [2025/12/11 16:01] (Version actuelle) Jean-Baptiste
Ligne 10: Ligne 10:
 findmnt --fstab -t nfs findmnt --fstab -t nfs
 </code> </code>
 +
  
 == Serveur == Serveur
Ligne 38: Ligne 39:
  
 l'option **no_root_squash** spécifie que le root de la machine sur laquelle le répertoire est monté a les droits de root sur le répertoire). L'option **root_squash** est l'option par défaut l'option **no_root_squash** spécifie que le root de la machine sur laquelle le répertoire est monté a les droits de root sur le répertoire). L'option **root_squash** est l'option par défaut
 +
  
 === NFS3 === NFS3
Ligne 75: Ligne 77:
 el01sn01:/export/common/patches /u01/common/patches nfs4 rw,bg,hard,nointr,rsize=131072,wsize=131072,proto=tcp el01sn01:/export/common/patches /u01/common/patches nfs4 rw,bg,hard,nointr,rsize=131072,wsize=131072,proto=tcp
 </code> </code>
 +
  
  
Ligne 136: Ligne 139:
 </code> </code>
  
 +
 +== Selinux
 +
 +<code bash>
 +#mount -t nfs -o vers=3,context="system_u:object_r:container_file_t:s0" <server>:/shared_folder /opt/ufm/files
 +mount -t nfs4        -o context="system_u:object_r:container_file_t:s0" <server>:/shared_folder /opt/ufm/files
 +</code>
  
 == Diag == Diag
Ligne 156: Ligne 166:
 sudo umount -a -t autofs -l sudo umount -a -t autofs -l
 </code> </code>
 +
  
 === Err access denied by server while mounting === Err access denied by server while mounting
Ligne 167: Ligne 178:
 # mount -t nfs 127.0.0.1:/exports/plop1 /mnt/nfs # mount -t nfs 127.0.0.1:/exports/plop1 /mnt/nfs
 </code> </code>
 +
  
 === Err Read-only file system === Err Read-only file system
Ligne 179: Ligne 191:
 /exports/plop1 192.168.56.0/24(ro,sync,no_subtree_check) /exports/plop1 192.168.56.0/24(ro,sync,no_subtree_check)
 </code> </code>
 +
  
 === Pb tail latency === Pb tail latency
Ligne 194: Ligne 207:
  
 However, if a file is directly opened (such as using ''vi'') on ECS-B under the same conditions, the updated content is visible immediately. However, if a file is directly opened (such as using ''vi'') on ECS-B under the same conditions, the updated content is visible immediately.
 +
  
 ==== Analysis ==== Analysis
Ligne 204: Ligne 218:
  
 The ''tail -f'' command uses ''sleep+fstat'' to monitor changes to the file attributes (primarily the file size), read files, and then output the results. However, file content output by using the ''tail -f'' command is dependent on the ''fstat'' result. Due to the metadata cache, the ''fstat'' command may not be monitoring real-time file attributes. Therefore, even if the file has been updated on the NFS server, the ''tail -f'' command cannot detect in real time whether the file has been changed or not, resulting in the latency. The ''tail -f'' command uses ''sleep+fstat'' to monitor changes to the file attributes (primarily the file size), read files, and then output the results. However, file content output by using the ''tail -f'' command is dependent on the ''fstat'' result. Due to the metadata cache, the ''fstat'' command may not be monitoring real-time file attributes. Therefore, even if the file has been updated on the NFS server, the ''tail -f'' command cannot detect in real time whether the file has been changed or not, resulting in the latency.
 +
  
 ==== Solution ==== Solution
Ligne 211: Ligne 226:
 mount -t nfs4 -o noac /mnt/ mount -t nfs4 -o noac /mnt/
 </code> </code>
 +
  
 == Autres == Autres
tech/notes_nfs.1742825205.txt.gz · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki