| Les deux révisions précédentesRévision précédente | |
| tech:notes_nfs [2025/10/01 15:54] – Jean-Baptiste | tech:notes_nfs [2025/12/11 16:01] (Version actuelle) – Jean-Baptiste |
|---|
| findmnt --fstab -t nfs | findmnt --fstab -t nfs |
| </code> | </code> |
| | |
| |
| == Serveur | == Serveur |
| |
| 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 |
| 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 |
| # 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 |
| /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 |
| |
| 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 |
| |
| 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 |
| mount -t nfs4 -o noac /mnt/ | mount -t nfs4 -o noac /mnt/ |
| </code> | </code> |
| | |
| |
| == Autres | == Autres |