[SOLVED] Re: Why updatedb doesn't traverse my external HD?

Marko Vojinovic vvmarko at gmail.com
Sat Dec 24 23:39:54 UTC 2011


On Saturday 24 December 2011 13:33:57 T.C. Hollingsworth wrote:
> On Sat, Dec 24, 2011 at 11:58 AM, Marko Vojinovic <vvmarko at gmail.com> wrote:
> > (1) What is the proper place to customize this configuration? I want
> > /media to be ext4, so that it doesn't get excluded by updatedb. I know
> > I could reconfigure the /lib/systemd/system/media.mount, but that would
> > probably be overwritten on update or something. How are these things
> > meant to be customized?
> 
> Yup, anything in /lib/systemd could get clobbered on update.  Files in
> /etc/systemd with the exact same name always override those in /lib,
> and /etc/systemd is for sysadmins only; RPM will never mess with
> anything there.  To completely disable something in /lib, you "mask"
> it:  just symlink /dev/null to an identically named file in /etc.  For
> more information, see:
> http://0pointer.de/blog/projects/three-levels-of-off.html

Great, thanks for the pointer, interesting read. :-)
 
> So, to disable the /media mount:
> ln -sf /dev/null /etc/systemd/system/media.mount

And we have a winner! :-D This is precisely what I was looking for. After 
masking the media.mount, I rebooted the machine and verified that /media is now 
just a directory under / (and consequently ext4), and updatedb picks it up and 
traverses everything below, just as I wanted.

Marking this as SOLVED. :-)

> > (2) Why is /media being mounted like this? If I reconfigure it back to
> > ext4, is anything else going to break?
> 
> For performance reasons.  Since /media is intended for temporary
> mounts only, it's faster to keep them in memory (via tmpfs) rather
> than hitting the disk every time you need to look one up.

Makes sense. It seems that this idea just has an (unforseen?) side-effect if 
one wants to customize updatedb for /media. :-) But this is of course far from 
the intended default behavior, so no arguments from me there. And in my case 
performance is not a serious issue.

I just need to remember to keep putting the symlink every time I do a fresh 
install from now on... ;-)

> When masking media.mount, /media will revert to being a directory on
> your root fs.  So long as it has the appropriate permissions,
> everything will still work fine.

That's nice to know! It would be a very bad thing (for me at least) if tmpfs 
was a requirement for some other functionality (that I might need 
simultaneously).

Thanks for help goes to T.C. and everyone else who contributed! ;-)

Best, :-)
Marko


More information about the users mailing list