Removing Hidden NFS Files
Hidden NFS files, .nfsxxx
, are created on NFS
Version 3 servers if a process on an NFS client removes a file which is still open by another
process. If the NFS client crashes, the .nfs
files are not removed. The
.nfs
files are removed using the nfsfind
script in the
root crontab
file. The root
cron job executes the
nfsfind
script every Sunday at 3:15 am.
Starting with Oracle Solaris 11.4, the svc:/network/nfs/cleanup
service
removes the hidden NFS files. The svc:/network/nfs/cleanup
service depends on
the svc:/network/nfs/server
service. Therefore, you must ensure that the NFS
service is online for the NFS cleanup service to perform its scheduled action.
When you upgrade a system to Oracle Solaris 11.4 from an earlier release, the treatment of the nfsfind
cron job depends on whether changes have been made to the root crontab
file. The upgrade to Oracle Solaris 11.4 might encounter the following scenarios:
-
If there are no changes, the
nfsfind
cron job is removed at upgrade. -
If there are changes to the
root crontab
but not to thenfsfind
cron job, the first run of thenfs/cleanup
service removes thenfsfind
cron job fromroot crontab
. -
If there are changes to the
nfsfind
cron job, the first run of thenfs/cleanup
service comments out thenfsfind
job and changes the state of thenfs/cleanup
service toDEGRADED
. You can remove thenfsfind
cron job from theroot crontab
after you change the schedule of thenfs/cleanup
service to match thenfsfind
cron job. You can use thesvcadm clear
command to move thenfs/cleanup
service out of theDEGRADED
state.