Case number
TS022926480
We are experiencing delays and blocking behavior when removing directories located on an NFS-mounted filesystem.
To investigate the issue, we performed a controlled test on server nim71. A test file was created and kept open by a background process using an active file descriptor. While the file was still open, we deleted it and then attempted to remove the parent directory using:
rm -rf <directory>
After the file deletion, NFS automatically renamed the file to a temporary .nfsXXXX file:
.nfsAFA3
The rm -rf operation remained blocked for approximately 58 seconds, until the background process released the open file descriptor. Once the process terminated, the .nfs* file disappeared automatically and the directory removal completed successfully.
Observed Behavior
File was deleted while still open by a running process.
NFS created a temporary .nfsXXXX file.
Directory removal (rm -rf) was unable to complete while the .nfs* file existed.
The removal operation completed only after the file descriptor was released.
The behavior is consistently reproducible.
Business Impact
In our environment, cleanup operations and automated processes may be delayed when files remain open. This can lead to long-running rm -rf operations, directory removal failures, and accumulation of temporary .nfs* files, impacting operational tasks and troubleshooting activities.
We would appreciate your assistance in reviewing:
Whether the observed behavior is expected for your NFS implementation.
Any server-side logs or events related to the test period.
NFS configuration parameters that may influence the handling of open deleted files.
Recommended best practices or tunable settings to minimize delays caused by .nfs* temporary files and open file handles.
The test successfully reproduces the issue and we can provide the reproduction script and execution output if required.
nim71[/TEST_EVS] sh -x reproducer_nfs_issue.sh
+ BASE_DIR=/TEST_EVS/TEST/test_nfs_issue_42401996
+ FILE=/TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
+ echo Creando directorio: /TEST_EVS/TEST/test_nfs_issue_42401996
Creando directorio: /TEST_EVS/TEST/test_nfs_issue_42401996
+ mkdir -p /TEST_EVS/TEST/test_nfs_issue_42401996
+ echo Creando archivo: /TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
Creando archivo: /TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
+ echo Contenido de prueba
+ 1> /TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
+ exec
+ + BG_PID=23003286
+ sleep 2
3< /TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
+ echo Archivo abierto con FD 3. PID: 42401996
Archivo abierto con FD 3. PID: 42401996
+ echo Manteniendo archivo abierto por 30 segundos...
Manteniendo archivo abierto por 30 segundos...
+ sleep 60
+ echo Intentando eliminar archivo mientras está abierto...
Intentando eliminar archivo mientras está abierto...
+ rm -f /TEST_EVS/TEST/test_nfs_issue_42401996/testfile.txt
+ echo Contenido del directorio después del rm:
Contenido del directorio después del rm:
+ ls -la /TEST_EVS/TEST/test_nfs_issue_42401996
total 24
drwxr-xr-x 2 root system 2048 Sep 02 09:28 .
drwxr-xr-x 7 root system 2048 Sep 02 09:28 ..
-rw-r--r-- 1 root system 20 Sep 02 09:28 .nfsAFA3
+ echo Intentando eliminar directorio completo...
Intentando eliminar directorio completo...
+ date
Wed Sep 2 09:28:35 -04 2026
+ rm -rf /TEST_EVS/TEST/test_nfs_issue_42401996
Liberando archivo...
+ echo Liberando archivo...
Liberando archivo...
+ date
Wed Sep 2 09:29:33 -04 2026
+ RM_PID=23003286
+ sleep 5
+ echo Estado actual:
Estado actual:
+ ps -fp 23003286
UID PID PPID C STIME TTY TIME CMD
+ ps -fp 23003286
UID PID PPID C STIME TTY TIME CMD
+ echo Archivos presentes (deberían aparecer .nfsXXXX):
Archivos presentes (deberían aparecer .nfsXXXX):
+ ls -la /TEST_EVS/TEST/test_nfs_issue_42401996
+ 2> /dev/null
+ echo Esperando que termine proceso que mantiene archivo abierto...
Esperando que termine proceso que mantiene archivo abierto...
+ wait 23003286
+ sleep 2
+ echo Estado final del directorio:
Estado final del directorio:
+ ls -la /TEST_EVS/TEST/test_nfs_issue_42401996
+ 2> /dev/null
+ echo Limpieza final...
Limpieza final...
+ rm -rf /TEST_EVS/TEST/test_nfs_issue_42401996
+ echo Finalizado.
Finalizado.
nim71[/TEST_EVS]