You are not logged in.

#1 2012-12-12 22:57:28

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

[SOLVED] Changed an option in /etc/updatedb.conf

Hello all,

I started using locate to search my files. However, it never showed files in my /home directory which is, obviously, the directory I search most. Running updatedb --debug-pruning I found out that it didn't add /home to the database because it's an "autofs" filetype:

┌─[jente @ lappy ~] 23:54:27 
└─■ sudo updatedb --debug-pruning
....
 `/home' (32 on 18) is `/' of `systemd-1' (0:27), type `autofs'
....
Skipping `/home': in prunefs
....

So, I edited /etc/updatedb.conf and removed autofs from the PRUNEFS line. I never found any documentation on this and thus, I don't know if this is the correct way of solving this. Hence this post; I would just like to get some feedback on whether or not I fixed this the right way.

Thanks in advance, guys! smile

Last edited by Unia (2012-12-15 13:45:36)


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#2 2012-12-13 22:38:15

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Perhaps I posted this in the wrong section. If so, can a mod move it to someplace it might get more attention?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#3 2012-12-14 22:11:17

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Another way would be to add your /home to fstab instead.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2012-12-14 22:12:31

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Mr.Elendig wrote:

Another way would be to add your /home to fstab instead.

Hey! Thanks for your input. My /home is actually already there:

#
# /etc/fstab: static file system information
#
# <file system>                 <dir>   <type>  <options>               <dump>  <pass>
tmpfs                       /tmp    tmpfs   nodev,nosuid                0   0
# /dev/sda1
UUID=60eb73f7-635c-4b3e-9d6a-8bb49aee739a   /       ext4    rw,relatime             0   1

# /dev/sda2 LABEL=home
UUID=4470b151-db99-4586-a652-398e0e8995cb   /home   ext4    rw,relatime,noauto,x-systemd.automount  0   2

If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#5 2012-12-15 00:11:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Yeah, I noticed this too... but I never got around to doing anything about it.  Maybe I should jsut stop using the x-systemd.automount feature, as I really don't know that I actually gain anything from it anyway.

Has the removal of autofs caused any issues for you Unia?

Offline

#6 2012-12-15 00:13:06

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Not that I know off... big_smile I have used locate a couple of times and it has always worked (gotta configure xdg-open, though) and none of my data was eaten


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#7 2012-12-15 01:00:11

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Yeah, I was thinking about it, and I guess the only filesystems that would show up as autofs would be the ones you specify with the x-systemd.automount (unless you are actually using autofs).  My concern would be the possibility of it then wanting to scan and include things like NFS shares and whatnot.  Network filesystems of all kinds are listed amongst those pruned, but I am curious if mlocate sees an nfs4 share with x-systemd.automount as both autofs and nfs4 or simply autofs.

Offline

#8 2012-12-15 01:10:12

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Unia wrote:
Mr.Elendig wrote:

Another way would be to add your /home to fstab instead.

Hey! Thanks for your input. My /home is actually already there:

#
# /etc/fstab: static file system information
#
# <file system>                 <dir>   <type>  <options>               <dump>  <pass>
tmpfs                       /tmp    tmpfs   nodev,nosuid                0   0
# /dev/sda1
UUID=60eb73f7-635c-4b3e-9d6a-8bb49aee739a   /       ext4    rw,relatime             0   1

# /dev/sda2 LABEL=home
UUID=4470b151-db99-4586-a652-398e0e8995cb   /home   ext4    rw,relatime,noauto,x-systemd.automount  0   2

If your /home is on an internal disk, why use automount?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#9 2012-12-15 12:15:15

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Changed an option in /etc/updatedb.conf

The Wiki page said:

Automount

If you have a large /home partition, it might be better to allow services that do not depend on /home to start while /home is checked by fsck. This can be achieved by adding the following options to the /etc/fstab entry of your /home partition:

noauto,x-systemd.automount

This will fsck and mount /home when it is first accessed, and the kernel will buffer all file access to /home until it is ready.

So since my /home is on a separate partition (of my first and only harddisk; laptop) I thought this'd improve boot-time. But now with your post, I'm questioning that?

Who can elaborate on this?


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#10 2012-12-15 12:20:09

Šaran
Member
From: Bosnia
Registered: 2011-09-03
Posts: 407

Re: [SOLVED] Changed an option in /etc/updatedb.conf

On my system it shaved maybe third of a second, but Transmission daemon failed to start most of the time, so I'm not using it anymore.

Offline

#11 2012-12-15 13:45:23

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: [SOLVED] Changed an option in /etc/updatedb.conf

Removing those automount options from /etc/fstab and adding back autofs to /etc/updatedb.conf does indeed make it work as it should, and my boot time didn't noticeably increase either!

I guess I'll mark this solved then. Thanks for all the input, guys!


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

Board footer

Powered by FluxBB