[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to make locate work



A short time ago, at a computer terminal far, far away, Jeffrey Baker wrote:
>How do I make locate work?  I installed slocate, I have this in
>/etc/cron.daily:
>
>... I have this in /etc/updatedb.conf:
>
># This file sets environment variables which are used by updatedb
>
># filesystems which are pruned from updatedb database
>PRUNEFS="NFS nfs afs proc smbfs autofs auto iso9660 ncpfs coda
>devpts ftpfs"
>export PRUNEFS
>
>... And my /var/lib/slocate/slocate.db is only 1 byte.  updatedb
>runs for about 1 microsecond before exiting without any output.  The
>ONLY thing updatedb does is this, after regular libc initialization:
>
>So, I ran 'slocate -u' by hand like the docs say, and it actually
>built an index.  Is this simply a case of the cron entry missing the
>right program flags, or omitting them for some peculiar reason?

I've run into the same problem, and at least in my case, it appears to be
because the root filesystem is ext3, but shows up as "auto" in mtab -- and
(as specified above in updatedb.conf) updatedb skips any filesystems it
finds mounted as "auto".

This also seems to have been a problem with 'df' as well (although I don't
see that problem on my machine; perhaps that's been fixed), and there's
some discussion about it in the ext3-users mailing list, for instance:

   https://listman.redhat.com/pipermail/ext3-users/2001-October/001859.html

The fix for this appears to be to specify the root fs type as "ext3"
instead of "auto" in fstab.  That fixes my updatedb, at least.

-- 
Will Day                  Those who would give up essential Liberty, to 
wd@hpgx.net               purchase a little temporary Safety, deserve neither
UNIX System Programmer    Liberty nor Safety.
Atlanta, GA                 - Benjamin Franklin, Penn. Assembly, Nov. 11, 1755

Attachment: pgpFiIoN8OSxC.pgp
Description: PGP signature


Reply to: