Main Page | Report this Page
Linux Forum Index  »  Linux - Slackware Forum  »  locate problems - at least 1 file missed...
Page 1 of 1    

locate problems - at least 1 file missed...

Author Message
geep...
Posted: Wed Oct 21, 2009 12:39 am
Guest
Hi everybody,
Slack 12.2, locate --version "Secure Locate 3.1 - Released March 7, 2006"

Anybody else had the problem that locate isn't listing files which exist?
I have deleted and recreated the database /var/lib/slocate/slocate.db

locate doesn't find these 2 files:
-rw-r--r-- 1 dad users 4984668160 2009-09-12 12:30 /space/VM/20GB.vmdk
-rw-r--r-- 1 dad users 7009714176 2009-10-01 22:56 /space3/20GB.vmdk

locate 20GB.vmdk
lists:
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

ls -l /mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk
lists:
lrwxrwxrwx 1 dad users 17 2009-09-16 13:47 /mnt/hda9/home/dad/
vmslackware.13.0/20GB.vmdk -> /space3/20GB.vmdk

Or am I missing the blindingly obvious somewhere?

Cheers,
Peter
 
geep...
Posted: Wed Oct 21, 2009 1:33 am
Guest
On Wed, 21 Oct 2009 12:56:21 +0200, Eef Hartman wrote:

Quote:
geep <geep_at at (no spam) boursomail.com> wrote:
vmslackware.13.0/20GB.vmdk -> /space3/20GB.vmdk

Or am I missing the blindingly obvious somewhere?

What kind of file system are those /space cq /space3. The version of
slocate, as distributed in slackware, skips the following types of
fs'es:
devpts NFS nfs afs proc smbfs autofs iso9660 udf (autofs = everything
mounted "on demand" by auto mounter).

Most of them are network fs'es as these should be indexed on their
hosts, not all of the clients.

Hi Eef,
0/ Quick - thanks!

1/ /space & /space3 are reiserfs.
Here are the relevant lines from my /etc/fstab
/dev/hda10 /space reiserfs auto,user,rw,exec 0 0
/dev/sda13 /space3 reiserfs auto,user,rw,exec 0 0
/dev/hda9 /mnt/hda9 reiserfs auto,user,rw,exec 0 0

2/ Haven't touched /etc/updatedb.conf - it's the Slackware default.

3/ Have now run "updatedb -v > updatedb.verbose.txt"

grep 20GB updatedb.verbose.txt
lists:
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk
/space/VM/20GB.vmdk

but doesn't list:
/space3/20GB.vmdk

I think it is confused by my link:
lrwxrwxrwx 1 dad users 17 2009-09-16 13:47 /mnt/hda9/home/dad/
vmslackware.13.0/20GB.vmdk -> /space3/20GB.vmdk

locate 20GB.vmdk
still only lists:
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

4/ Am not quite sure how updatedb/locate handles links, or is supposed
to handle links.

Cheers,
Peter
 
geep...
Posted: Wed Oct 21, 2009 4:07 am
Guest
On Wed, 21 Oct 2009 14:56:45 +0200, Eef Hartman wrote:

Quote:
geep <geep_at at (no spam) boursomail.com> wrote:
locate 20GB.vmdk
still only lists:
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

Another thing to check is the permission OF the files to be located. I
_think_ and this seems to suggest it:
Secure Locate provides a secure way to index and quickly search
for all
files on your system regardless of ownership. It uses incremental
encoding just like GNU locate to compress its database to make
search-ng faster, but it will also check file permissions and
ownership
before displaying matched
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
entries so that users will not see files they do not have
access
to.
that you will not see files you don't have read-access (at least) for.
Try to do the locate as root, it should be able to access all local
files.

Hi Eef,


Tried locate as root - no difference.
dad:users is the owner of the 3 files, and the directories they're in.

I have duplicated the structure of 2 files and 1 link alongside the
existing files. This is fine. updatedb indexes all 3, locate finds all 3.

Maybe I should try "GNU locate" rather than slocate to see if it has the
same problem.

Quote:
4/ Am not quite sure how updatedb/locate handles links, or is supposed
to handle links.

The right way, the link is a file, the file linked TO another:
$ ls -l `locate bin/gzip`
-rwxr-xr-x 1 root root 53912 2007-05-07 05:44 /bin/gzip lrwxrwxrwx 1
root root 14 2008-12-15 12:37 /usr/bin/gzip -> ../../bin/gzip so it
finds both the file (/bin/gzip) and the link (/usr/bin/gzip).

I searched for "bin/gzip" to eliminate a lot of other hits, even this
output I had to cleanup a bit as there were 4 other unrelated results
(like the Windows version gzip.exe, which is samba-shared TO MS-Win
clients).
OK. I'm now seeing that locate lists "normal" files and "link" files.
 
Eef Hartman...
Posted: Wed Oct 21, 2009 4:56 am
Guest
geep <geep_at at (no spam) boursomail.com> wrote:
Quote:
vmslackware.13.0/20GB.vmdk -> /space3/20GB.vmdk

Or am I missing the blindingly obvious somewhere?

What kind of file system are those /space cq /space3.
The version of slocate, as distributed in slackware,
skips the following types of fs'es:
devpts NFS nfs afs proc smbfs autofs iso9660 udf
(autofs = everything mounted "on demand" by auto mounter).

Most of them are network fs'es as these should be indexed
on their hosts, not all of the clients.
--
*******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M.Hartman at (no spam) tudelft.nl - phone: +31-15-278 82525 **
*******************************************************************
 
geep...
Posted: Wed Oct 21, 2009 5:23 am
Guest
On Wed, 21 Oct 2009 14:07:03 +0000, geep wrote:

Quote:
Maybe I should try "GNU locate" rather than slocate to see if it has the
same problem.

Have now installed "GNU locate" from findutils 4.4.2. It works fine.

../configure \
--prefix=/home/dad/findutils
make -j 2
checkinstall

slocate. Slackware defaults in /etc/updatedb.conf
Build the database, as root, using:
updatedb

Search the database:
/usr/bin/locate 20GB.vmdk
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

GNU locate.
Build the database, as root, using:
cd /home/dad/findutils/bin
../updatedb --output=/home/dad/findutils/locatedb

Search the database:
/home/dad/findutils/bin/locate --database=/home/dad/findutils/locatedb \
20GB.vmdk
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk
/space/VM/20GB.vmdk
/space3/20GB.vmdk

So this seems like a bug with updatedb/slocate.

Cheers,
Peter
 
Eef Hartman...
Posted: Wed Oct 21, 2009 6:56 am
Guest
geep <geep_at at (no spam) boursomail.com> wrote:
Quote:
locate 20GB.vmdk
still only lists:
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

Another thing to check is the permission OF the files to
be located. I _think_ and this seems to suggest it:
Secure Locate provides a secure way to index and quickly search for all
files on your system regardless of ownership. It uses incremental encoding
just like GNU locate to compress its database to make search-ng faster, but
it will also check file permissions and ownership before displaying matched
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
entries so that users will not see files they do not have access to.
that you will not see files you don't have read-access (at least) for.
Try to do the locate as root, it should be able to access all local files.

Quote:
4/ Am not quite sure how updatedb/locate handles links, or is supposed
to handle links.

The right way, the link is a file, the file linked TO another:
$ ls -l `locate bin/gzip`
-rwxr-xr-x 1 root root 53912 2007-05-07 05:44 /bin/gzip
lrwxrwxrwx 1 root root 14 2008-12-15 12:37 /usr/bin/gzip -> ../../bin/gzip
so it finds both the file (/bin/gzip) and the link (/usr/bin/gzip).

I searched for "bin/gzip" to eliminate a lot of other hits, even this
output I had to cleanup a bit as there were 4 other unrelated results
(like the Windows version gzip.exe, which is samba-shared TO MS-Win
clients).
--
*******************************************************************
** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
** e-mail: E.J.M.Hartman at (no spam) tudelft.nl - phone: +31-15-278 82525 **
*******************************************************************
 
geep...
Posted: Wed Oct 21, 2009 8:14 am
Guest
On Wed, 21 Oct 2009 15:23:59 +0000, geep wrote:

Quote:
On Wed, 21 Oct 2009 14:07:03 +0000, geep wrote:

Maybe I should try "GNU locate" rather than slocate to see if it has
the same problem.

Have now installed "GNU locate" from findutils 4.4.2. It works fine.
./configure \
--prefix=/home/dad/findutils
make -j 2
checkinstall

slocate. Slackware defaults in /etc/updatedb.conf Build the database, as
root, using:
updatedb

Search the database:
/usr/bin/locate 20GB.vmdk
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk

GNU locate.
Build the database, as root, using:
cd /home/dad/findutils/bin
./updatedb --output=/home/dad/findutils/locatedb

Search the database:
/home/dad/findutils/bin/locate --database=/home/dad/findutils/locatedb \
20GB.vmdk
/mnt/hda9/home/dad/vmslackware.13.0/20GB.vmdk /space/VM/20GB.vmdk
/space3/20GB.vmdk

So this seems like a bug with updatedb/slocate.

Cheers,
Peter

Hi Eeef and group,

Indeed it seems a bug. slocate ignores my large files.
locate lists a 1.9G file, but not some larger files 3.1G or above.
"GNU locate" list the large files OK.

I now found a couple of bug reports on this topic:
Gentoo bug report "slocate-3.1 ignores large files on 32bit x86"
http://bugs.gentoo.org/280620

Re: anomalous behavior of slocate(1)
http://tinyurl.com/yhhahvr

I'd be interested if anybody else with Slackware is seeing the same
problem.

Cheers,
Peter
 
+Alan Hicks+...
Posted: Thu Oct 22, 2009 3:06 pm
Guest
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2009-10-21, geep <geep_at at (no spam) boursomail.com> wrote:
Quote:
I'd be interested if anybody else with Slackware is seeing the same
problem.

I've been able to reproduce this problem on Slackware 13.0 on x86
systems, so it's a real bug with slocate. Apparently it's been around
for some time, 'cause slocate hasn't been maintained for years. If this
is giving you trouble, and you don't want to resort to GNU locate, I've
placed a SlackBuild script for mlocate on the web. You can find it
here:

http://slackware.com/~alan/mlocate.tar.gz

In order to use this, you should first uninstall slocate (just to fix
some conflictions with the man pages really), and change the slocate
group to mlocate before compiling.

- --
It is better to hear the rebuke of the wise,
Than for a man to hear the song of fools.
Ecclesiastes 7:5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrgyVEACgkQNj1TaGS9H5JeqACfRL146OJ5uMgbQ2NWmjsMsVqb
GwkAn0md9hzf9UHTLShhlUgeHoJgTbwj
=o71F
-----END PGP SIGNATURE-----
 
...
Posted: Thu Oct 22, 2009 4:18 pm
Guest
Coward Alan Hicks <alan at (no spam) lizella.network> trolled:

pgp trash troll delete

Quote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In order to use this, you should first uninstall slocate (just to fix
some conflictions with the man pages really), and change the slocate
group to mlocate before compiling.

A far easier way is to simply remove the pgp trash that you still
use to pollute usenet.

Quote:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkrgyVEACgkQNj1TaGS9H5JeqACfRL146OJ5uMgbQ2NWmjsMsVqb
GwkAn0md9hzf9UHTLShhlUgeHoJgTbwj
=o71F
-----END PGP SIGNATURE-----

What is all this crap for? It doesn't prove anything, other than
you know how to annoy others.

cordially, as always,

rm
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Sun Dec 06, 2009 2:29 pm