Subject: Re: Mysterious file disappearances?
To: J.T. Conklin <jconklin@netcom.com>
From: Rodney W. Grimes <rgrimes@gndrsh.aac.dev.com>
List: netbsd-users
Date: 08/08/1995 11:20:22
> 
> >   I have /scratch mounted on /dev/sd0f. Now and then (indeterminate 
> >   times, but *maybe* around 2:00am fsck) I lose a bunch of files 
> >   in the directory (even lost a recent set of -current tarfiles..).
> 
> >   And another thing - as far as I can tell, the problem is affecting
> >   just the one partition, /scratch... This partition used to be /usr,
> >   and was in use as such for about 5 months, with no problems at all.
> > 
> >   What could be wrong?
> 
> See the following code in the daily cron script:
> 
> 	if [ -d /scratch -a ! -h /scratch ]; then
> 	        cd /scratch && {
>         	find . ! -name . -atime +1 -exec rm -f -- {} \;
> 	        find . ! -name . -type d -mtime +1 -exec rmdir -- {} \; \
> 	            >/dev/null 2>&1; }
> 	fi
> 
> I'd pick a new mount point for your partition, or remove that section
> from /etc/daily.

I would suggest that NetBSD ship this turned off by default.  /tmp is
a well known clean up area, /scratch is not, it is a BSDism that a lot
of folks are unaware of.  I know other *BSD systems that have purposely
commented this out with an echo message stating so in the mail message
for the very reason this user is seeing.

-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers