Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Poettering: Rethinking PID 1
Posted May 2, 2010 23:24 UTC (Sun) by jwb (guest, #15467)
Posted May 3, 2010 15:11 UTC (Mon) by bronson (subscriber, #4806)
I don't see a big race... If you're talking about missing changes because they occurred before the treewalk is done then I agree: inotify needs to be established before the system starts doing much.
Personally, I remove locate and updatedb from all machines I manage, including laptops. I find that all my needs are met by dpkg --search and the find command. I'm really surprised that updatedb is still a part of default Linux installs: it's intrusive and locate is almost useless!
Posted May 6, 2010 16:24 UTC (Thu) by marcH (subscriber, #57642)
Intrusive yes, but so useful and convenient.
locate answers instantly, and there is no need to remember it's command line syntax (it has none). Sometimes I use locate instead of find even when I know for sure that the file is just a few directory levels below.
Posted May 3, 2010 22:18 UTC (Mon) by cmccabe (guest, #60281)
My point was that you often want to do large jobs in the background, without having them interfere with what's going on in the foreground. Putting them in a separate cgroup is a step forward.
Beagle acts like a filesystem index, and listens to inotify. The last time I tried it, it made my system unusably slow by aggressively trying to index files as soon as they were created. That was on an older computer with only one core, though. Maybe I'll give it another try in the future when I get some time. In the meantime, asserting that alternative solutions "should not exist" seems kind of trollish.
Posted May 7, 2010 7:57 UTC (Fri) by pabs (subscriber, #43278)
Posted May 16, 2010 23:53 UTC (Sun) by cmccabe (guest, #60281)
I always forget where things are, so I end up using slocate all the time.
It seems like are some tradeoffs here. Having a daemon that listens to inotify makes things slower while you're using the machine. It's more complicated and more likely to lose track of files. The updatedb / slocate scheme probably uses more power in total because it does a treewalk while you're asleep. But it is simple and always works. Of course, information may be slightly out-of-date.
Maybe people who are really concerned about the power issues should do updatedb once a week instead of daily? Would that be an acceptable tradeoff?
I suspect that, like vi/emacs, this debate will not be resolved any time soon.
Posted May 17, 2010 5:51 UTC (Mon) by avik (guest, #704)
In short, it's a static solution that doesn't fit the dynamic environment of the last 15 years.
Posted May 17, 2010 6:31 UTC (Mon) by nix (subscriber, #2304)
files accessible to the user but not accessible to root
Posted May 17, 2010 9:57 UTC (Mon) by nye (guest, #51576)
>They must be easy to back up, with properties like that.
Arg. This is how user files work in Windows by default. So annoying. Windows makes a chore out of things that should be so simple.
Anyway the solution is probably to have backups done individually by the user if there is only one and it's the same person as root (ie. yourself), or to have a user whose dedicated role is to be able to read every non-special file for backup purposes, without any of the other permissions root would have which could potentially be dangerous. Then again, you could just run updatedb as that user, so...
Posted May 17, 2010 6:49 UTC (Mon) by dlang (✭ supporter ✭, #313)
Posted May 17, 2010 7:56 UTC (Mon) by avik (guest, #704)
(nor am I assuming everyone uses systems like mine; it's sufficient that a substantial fraction of users suspend or turn off their machines at night, or use detachable storage, to show that updatedb is outdated)
Posted May 17, 2010 10:25 UTC (Mon) by dlang (✭ supporter ✭, #313)
Posted May 17, 2010 11:04 UTC (Mon) by avik (guest, #704)
Posted May 7, 2010 7:55 UTC (Fri) by pabs (subscriber, #43278)
Posted May 8, 2010 22:08 UTC (Sat) by nix (subscriber, #2304)
(if the inotify daemon did exist, it would need to be able to be told to write out separate dbs for specific subtrees, at least, so that the NFS server could run it and export locate databases to its clients.)
Posted May 8, 2010 22:34 UTC (Sat) by foom (subscriber, #14868)
Posted May 9, 2010 9:53 UTC (Sun) by nix (subscriber, #2304)
No thank you.
Posted May 10, 2010 1:35 UTC (Mon) by foom (subscriber, #14868)
And security shouldn't be a huge deal -- you only need expose it to the users you're exporting the filesystem to, anyhow.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds