FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-23-2011, 02:33 PM
Marko Vojinovic
 
Default Why updatedb doesn't traverse my external HD?

Please someone explain me the following ---

[root@Yoda ~]# updatedb
[root@Yoda ~]# locate teraipo
/dev/disk/by-label/teraipo
[root@Yoda ~]# ll /media/
total 4
drwxr-xr-x. 17 vmarko vmarko 4096 Nov 15 00:49 teraipo

In addition, nothing under /media/teraipo/ can be located using "locate". Not
a single file in the 1.5 TB archive, on an external ext4 hard drive:

[root@Yoda ~]# mount | grep teraipo
/dev/sdb1 on /media/teraipo type ext4
(rw,nosuid,nodev,relatime,seclabel,user_xattr,acl, barrier=1,data=ordered,uhelper=udisks)

Before anyone points out that updatedb doesn't traverse /media by default, let
me add that I already knew that and have removed /media from PRUNEPATHS:

[root@Yoda ~]# cat /etc/updatedb.conf
PRUNE_BIND_MOUNTS = "no"
PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda
configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2
hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc
ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf
usbfs"
PRUNENAMES = ".git .hg .svn"
PRUNEPATHS = "/afs /mnt /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups
/var/spool/squid /var/tmp"

I have also configured bind mounts to be traversed, hoping that it might fix the
problem with /media. It didn't.

This configuration used to work on F14. Skipped F15, clean-installed F16, if it
matters.

I'm out of ideas. Anyone?

Best, :-)
Marko


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 02:36 PM
"G.Wolfe Woodbury"
 
Default Why updatedb doesn't traverse my external HD?

On 12/23/2011 10:33 AM, Marko Vojinovic wrote:

[root@Yoda ~]# cat /etc/updatedb.conf
PRUNE_BIND_MOUNTS = "no"
PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda
configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2
hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc
ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf
usbfs"
PRUNENAMES = ".git .hg .svn"
PRUNEPATHS = "/afs /mnt /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups
/var/spool/squid /var/tmp"

I have also configured bind mounts to be traversed, hoping that it might fix the
problem with /media. It didn't.

This configuration used to work on F14. Skipped F15, clean-installed F16, if it
matters.


Maybe the "usbfs" tag in prunefs?

--
G.Wolfe Woodbury

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 03:05 PM
Marko Vojinovic
 
Default Why updatedb doesn't traverse my external HD?

On Friday 23 December 2011 10:36:47 G.Wolfe Woodbury wrote:
> On 12/23/2011 10:33 AM, Marko Vojinovic wrote:
> > [root@Yoda ~]# cat /etc/updatedb.conf
> > PRUNE_BIND_MOUNTS = "no"
> > PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs
> > coda configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs
> > fusectl gfs gfs2 hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs
> > nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs
> > sfs sockfs sysfs tmpfs ubifs udf usbfs"
> > PRUNENAMES = ".git .hg .svn"
> > PRUNEPATHS = "/afs /mnt /net /sfs /tmp /udev /var/cache/ccache
> > /var/spool/cups /var/spool/squid /var/tmp"
> >
> > I have also configured bind mounts to be traversed, hoping that it might
> > fix the problem with /media. It didn't.
> >
> > This configuration used to work on F14. Skipped F15, clean-installed
> > F16, if it matters.
>
> Maybe the "usbfs" tag in prunefs?

Well, my HD is indeed connected to a USB port, but it is formatted ext4, so I
don't see how could usbfs be matched against that. I'll retry without usbfs
just to check, but I doubt that will help...

Best, :-)
Marko


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-23-2011, 04:12 PM
JB
 
Default Why updatedb doesn't traverse my external HD?

Marko Vojinovic <vvmarko <at> gmail.com> writes:

> ...
> This configuration used to work on F14. Skipped F15, clean-installed F16, if
> it matters.
>

man updatedb
...
--debug-pruning
Write debugging information about pruning decisions to standard
error output.
...

Try it with manual entry or /etc/cron.daily/mlocate.cron .

JB




--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 04:04 PM
Marko Vojinovic
 
Default Why updatedb doesn't traverse my external HD?

On Friday 23 December 2011 17:12:35 JB wrote:
> Marko Vojinovic <vvmarko <at> gmail.com> writes:
> ...
> --debug-pruning
> Write debugging information about pruning decisions to
> standard error output.
>
> Try it with manual entry or /etc/cron.daily/mlocate.cron .

Thanks for the suggestion, somehow I overlooked this option in the man page.
I did a "updatedb --debug-pruning", here goes the relevant part of the output:

<quote>
Checking whether filesystem `/media' is excluded:
`/', type `rootfs'
=> type matches, dir `/'
`/proc', type `proc'
=> type matches, dir `/proc'
`/sys', type `sysfs'
=> type matches, dir `/sys'
`/dev', type `devtmpfs'
`/dev/pts', type `devpts'
=> type matches, dir `/dev/pts'
`/dev/shm', type `tmpfs'
=> type matches, dir `/dev/shm'
`/run', type `tmpfs'
=> type matches, dir `/run'
`/', type `ext4'
`/run', type `tmpfs'
=> type matches, dir `/run'
`/sys/fs/selinux', type `selinuxfs'
=> type matches, dir `/sys/fs/selinux'
`/sys/fs/cgroup', type `tmpfs'
=> type matches, dir `/sys/fs/cgroup'
`/sys/fs/cgroup/systemd', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/systemd'
`/sys/fs/cgroup/cpuset', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/cpuset'
`/sys/fs/cgroup/cpu,cpuacct', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/cpu,cpuacct'
`/sys/fs/cgroup/memory', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/memory'
`/sys/fs/cgroup/devices', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/devices'
`/sys/fs/cgroup/freezer', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/freezer'
`/sys/fs/cgroup/net_cls', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/net_cls'
`/sys/fs/cgroup/blkio', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/blkio'
`/sys/fs/cgroup/perf_event', type `cgroup'
=> type matches, dir `/sys/fs/cgroup/perf_event'
`/proc/sys/fs/binfmt_misc', type `autofs'
=> type matches, dir `/proc/sys/fs/binfmt_misc'
`/sys/kernel/security', type `securityfs'
=> type matches, dir `/sys/kernel/security'
`/sys/kernel/debug', type `debugfs'
=> type matches, dir `/sys/kernel/debug'
`/media', type `tmpfs'
=> type matches, dir `/media'
...done
Skipping `/media': in prunefs
</quote>

I am not sure how to read this, but it appears that /media somehow matches the
tmpfs, which gets excluded. So now I have three questions:

(1) Why is /media considered to be tmpfs? AFAIK, it is just a directory under
my root partition, which is ext4. What am I missing?

(2) How do I fix this? I don't want to remove tmpfs from prunefs. Is there a
way to reconfigure the /media to not be tmpfs? Or is there any way to force
updatedb to traverse the contents of /media regardless of pruning rules?

(3) What exactly changed here between F14 and F16? In F14 the same
configuration used to work, ie. /media was not recognized as tmpfs, AFAIK.

Best, :-)
Marko





--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 04:44 PM
"G.Wolfe Woodbury"
 
Default Why updatedb doesn't traverse my external HD?

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.


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.


Another possibility is figuring out the udev stuff that mounts the
external drive and adding a custom stanza to the rules to mount it
somewhere beside /media.


Perhaps someone with more expertise in the systemd/usdev/etc stuff can
comment?


--
G.Wolfe Woodbury
aka redwolfe

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 05:58 PM
Marko Vojinovic
 
Default Why updatedb doesn't traverse my external HD?

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@Yoda ~]# mount | grep media
tmpfs on /media type tmpfs
(rw,nosuid,nodev,noexec,relatime,rootcontext=syste m_ubject_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@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


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 06:07 PM
Reindl Harald
 
Default Why updatedb doesn't traverse my external HD?

Am 24.12.2011 19:58, schrieb Marko Vojinovic:
> (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?

/media is for temporary mounts and this design is OK
mount your drive somewhere else


> (2) Why is /media being mounted like this? If I reconfigure it back to ext4, is
> anything else going to break?

because it makes no sense to "updatedb" temporary mounts like
usb-disks, network-mounts and such things since locate-hits
are normally useless for them and "updatedb" runs forever
on slow temporary mounts with a hughe amount of files

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 07:21 PM
JB
 
Default Why updatedb doesn't traverse my external HD?

Reindl Harald <h.reindl <at> thelounge.net> writes:

>
>
> Am 24.12.2011 19:58, schrieb Marko Vojinovic:
> > (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?
>
> /media is for temporary mounts and this design is OK
> mount your drive somewhere else

I think you confuse "temporary mounts" term with tmpfs.

http://en.wikipedia.org/wiki/Tmpfs
...
It is intended to appear as a mounted file system, but stored in volatile memory
instead of a persistent storage device.
...
On reboot, everything in tmpfs will be lost.
...

Anything mounted on /media has to be of actual "type" of that media.
Btw, a CD mounted on /media, even if temporarily, represents "a persistent
storage device", and certainly NOT "volatile memory" (e.g. of type shm).

I think systemd devs need to remove it - it is a pure nonsense.

>
> > (2) Why is /media being mounted like this? If I reconfigure it back to
> > ext4, is
> > anything else going to break?
>
> because it makes no sense to "updatedb" temporary mounts like
> usb-disks, network-mounts and such things since locate-hits
> are normally useless for them and "updatedb" runs forever
> on slow temporary mounts with a hughe amount of files
>
>
>

The place to prune /media is as under F14, that is by path and NOT by fs:
# cat /etc/updatedb.conf-orig
...
PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups
/var/spool/squid /var/tmp"
#

JB


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 
Old 12-24-2011, 07:33 PM
"T.C. Hollingsworth"
 
Default Why updatedb doesn't traverse my external HD?

On Sat, Dec 24, 2011 at 11:58 AM, Marko Vojinovic <vvmarko@gmail.com> wrote:
> 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@Yoda ~]# mount | grep media
> tmpfs on /media type tmpfs
> (rw,nosuid,nodev,noexec,relatime,rootcontext=syste m_ubject_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@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?

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

So, to disable the /media mount:
ln -sf /dev/null /etc/systemd/system/media.mount

> (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.

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.

-T.C.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org
 

Thread Tools




All times are GMT. The time now is 03:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org