Why updatedb doesn't traverse my external HD?
Marko Vojinovic
vvmarko at gmail.com
Sat Dec 24 18:58:57 UTC 2011
On Saturday 24 December 2011 12:44:58 G.Wolfe Woodbury wrote:
> looking at the output of the mount command on F16, it lists tmpfs on
> /media. This is different from F14 and Gentoo, where /media is a regular
> directory.
Thanks for pointing this out! :-) Indeed, /media is explicitly mounted, rather
than being an ordinary directory under /:
[root at Yoda ~]# mount | grep media
tmpfs on /media type tmpfs
(rw,nosuid,nodev,noexec,relatime,rootcontext=system_u:object_r:mnt_t:s0,seclabel,mode=755)
/dev/sdb1 on /media/teraipo type ext4
(rw,nosuid,nodev,relatime,seclabel,user_xattr,acl,barrier=1,data=ordered,uhelper=udisks)
the external HD is mounted as ext4 on in /media/teraipo, but /media itself is
mounted(???) as tmpfs, and consequently updatedb doesn't traverse it.
> Look for the start up stuff that makes the mount and disable it, then
> /media will just be a directory. However, the USB subsystem may not
> properly work.
Ok, after a small search I found that systemd mounts the /media directory
explicitly. The relevant script is:
[root at Yoda ~]# cat /lib/systemd/system/media.mount
[Unit]
Description=Media Directory
Before=local-fs.target
[Mount]
What=tmpfs
Where=/media
Type=tmpfs
Options=mode=755,nosuid,nodev,noexec
It seems that this was done by design, specifically for this directory. Ok,
next two questions:
(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?
(2) Why is /media being mounted like this? If I reconfigure it back to ext4, is
anything else going to break?
I think we need an expert on systemd here... ;-) Would it be a good idea to
start another thread for this?
Best, :-)
Marko
More information about the users
mailing list