You are not logged in.

#1 2023-10-18 16:24:10

esrevinu
Member
Registered: 2013-12-12
Posts: 20

[SOLVED] mlocate updatedb by systemd service results in smaller db

If updatedb.service is executed, I can't locate some files, for example '/usr/share/libgweather-4/Locations.xml'.
If I manually run updatedb, I can find this file.

❯ sudo systemctl start updatedb.service
❯ locate Locations.xml
❯ sudo ls -l /var/lib/mlocate
total 40212
-rw-r----- 1 root locate 41173479 Oct 19 01:12 mlocate.db
❯ sudo updatedb
❯ sudo ls -l /var/lib/mlocate
total 74468
-rw-r----- 1 root locate 76254522 Oct 19 01:13 mlocate.db
❯ locate Locations.xml
/usr/share/libgweather-4/Locations.xml

Last edited by esrevinu (2023-10-19 15:23:52)

Offline

#2 2023-10-18 19:33:02

seth
Member
Registered: 2012-09-03
Posts: 58,400

Re: [SOLVED] mlocate updatedb by systemd service results in smaller db

Did you check "systemctl status updatedb" ?

Offline

#3 2023-10-19 08:08:05

esrevinu
Member
Registered: 2013-12-12
Posts: 20

Re: [SOLVED] mlocate updatedb by systemd service results in smaller db

Yes, I did.

❯ sudo systemctl status updatedb.service
* updatedb.service - Update locate database
     Loaded: loaded (/usr/lib/systemd/system/updatedb.service; static)
     Active: inactive (dead) since Thu 2023-10-19 17:03:42 KST; 1min 43s ago
TriggeredBy: * updatedb.timer
    Process: 90707 ExecStart=/usr/bin/updatedb (code=exited, status=0/SUCCESS)
   Main PID: 90707 (code=exited, status=0/SUCCESS)
        CPU: 2.205s

Oct 19 17:03:31 kikyo systemd[1]: Starting Update locate database...
Oct 19 17:03:42 kikyo systemd[1]: updatedb.service: Deactivated successfully.
Oct 19 17:03:42 kikyo systemd[1]: Finished Update locate database.
Oct 19 17:03:42 kikyo systemd[1]: updatedb.service: Consumed 2.205s CPU time.

Offline

#4 2023-10-19 08:43:59

esrevinu
Member
Registered: 2013-12-12
Posts: 20

Re: [SOLVED] mlocate updatedb by systemd service results in smaller db

In /etc/updatedb.conf, I changed PRUNE_BIND_MOUNTS to "no". This fixed this issue.
I am using Btrfs. It seems to be related to Btrfs.

Offline

#5 2023-10-19 12:11:17

seth
Member
Registered: 2012-09-03
Posts: 58,400

Re: [SOLVED] mlocate updatedb by systemd service results in smaller db

\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Though it's a bit odd that the timered and manual invocation behave differently hmm
And you probably actually want the timered invocation that seems to adhere to the config and deduplicates the database?

Offline

Board footer

Powered by FluxBB