Talk:Inotify

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Linux (Rated Start-class)
WikiProject icon This article is within the scope of WikiProject Linux, a collaborative effort to improve the coverage of Linux on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 ???  This article has not yet received a rating on the project's importance scale.
 

Unnamed section[edit]

Should inotify begin with a lowercase i? the article currently uses an uppercase but besides wikipedia I have only seen it referred to with a lowercase i. Jdufresne 00:34, 9 September 2005 (UTC)

Should email rml and ask. 130.57.22.69 21:41, 12 September 2005 (UTC)

My edit[edit]

AFAIK this information is accurate but it is based on the information on getting an inotify kernel to work at the Beagle website. If anyone knows anything more detailed then don't hesitate to obliterate my stuff in favour of more accurate info.

Accuracy of the disadvantages[edit]

Having researched inotify a bit, I don't understand why the article states these supposed disadvantages as facts, especially given that Rlove himself has edited the article. Before, he has stated: "Making it easy and efficient to watch a full tree, however, was a goal of inotify." [1] He has also given an algorithm for subdirectory recursion that would appear race-free [2] In any case, the claims should be referenced. --TuukkaH 21:25, 7 August 2007 (UTC)

Yes, that limitation is not real and the algorithm to perform recursive watching with inotify is trivial. I am going to remove it.

There is still an issue with recursive watching using inotify: whilst the client application can easily establish a set of watches that will traverse an entire static directory tree, it is not guaranteed to cope with the creation of a file/subdirectory that is the side-effect of the creation of a new directory. The only two examples of this that I am aware of are mkdir -p dir1/dir2... and cp -r source_dir target_dir. In each of these cases, the client application can automatically set up a new watch on the directory that is newly created in the watched directory (dir1 and source_dir respectively), but it is highly likely that these new watches will be established too late to capture the creation of the objects within these directories (dir2 and files/directories within source_dir respectively). See Pyinotify ticket for more detail. What the client application has to do when it is notified of the creation of a directory within a watched directory is, in addition to placing a watch on the new directory, to list its contents and check that these agree with the inotify events it has received; if they do not, it must work around this by, say, generating dummy event notifications to itself, and it must also recurse down through any further directories below this point. This is a real limitation of inotify, IMO. It is worth noting that audit does not suffer from this limitation, but of course you need root access to run that. Eddie Eyles (talk) 02:32, 24 January 2010 (UTC)

Usability of INotify[edit]

If this is such a great subsystem, why can't I get any information surrunding the event? (pid/user/time/anything else) —Preceding unsigned comment added by 207.42.218.2 (talk) 20:42, 7 February 2008 (UTC)

Security.

You can get all the data items specified, and more, if you have root access and use audit. Eddie Eyles (talk) 02:37, 24 January 2010 (UTC)

Inotify overlaps with kernel's audit system: need a cross-reference?[edit]

Most (all?) of what inotify does is also done by audit in the Linux kernel. I feel that someone coming to this inotify article with general filesystem monitoring in mind (rather than inotify specifically) should be shown that at least one other native facility is also available. Therefore there should be at least a cross-reference to audit, if not a comparison with it. Unfortunately audit (as a Linux kernel system) does not seem to appear in Wikipedia at all. What do people think? I'd be happy to supply some suitable text, but I'm no expert. —Preceding unsigned comment added by Eddie Eyles (talkcontribs) 01:53, 24 January 2010 (UTC) Eddie Eyles (talk) 02:03, 24 January 2010 (UTC)

FSNotify[edit]

It would be nice, if someone could explain fsnotify. —Preceding unsigned comment added by 194.113.71.71 (talk) 10:27, 15 December 2010 (UTC)

Limitations for efficient file-incremental backups[edit]

It seems that INotify lacks features to accurately track file system changes for purposes of file-incremental backups, which are needed for reasonable efficiency when dealing with frequent/continuous backups of large files. Tracking changed intervals of a file means that the backup program when encountering a large/huge changed file can just deal with the changed bytes of the file, which may be relatively small. Without tracking of changed intervals, the backup program has no choice every time a change notification is received but to reread the entire file contents and compare all blocks with previously-saved fingerprints. I would like to add this to the list of limitations 2601:681:300:F185:5D52:1FD3:A246:7745 (talk) 12:27, 19 August 2015 (UTC)

Sure, just make sure you comply with the WP:Verifiability guideline by citing a published source. -- intgr [talk] 14:36, 19 August 2015 (UTC)
Are there any backup programs that actually use the inotify mechanism? There's lsync, of course, but it's a mirroring software that uses inotify just for "pings" and relies on rsync. AFAIK, all Linux backup software uses ctime and mtime to determine file system changes; moreover, how would a backup program collect all inotify notifications for its nightly runs in a reliable way? Doesn't make much sense, IMHO, so describing possible inefficiencies with large files would be rather redundant, even more because inotify doesn't provide any details about what changed inside a file. — Dsimic (talk | contribs) 18:07, 19 August 2015 (UTC)
Using ctime and mtime exclusively is only an option for systems that back up smaller hierarchies and/or less frequently update. Backup programs do indeed use inotify because there is not something better. The fact that some programs wastefully rescan the entire file hierarchy for a backup does nothing to justify the additional lack of intra-file change tracking in the notification they also don't use also requiring them to scan inside large files for changes. Inotify takes you part of the way, but only part without noting the byte ranges.
I know this irks Wikipedia, but I require anonymity, and have not found another way to create public sources anonymously, so perhaps the public understanding of such must remain in the stone age until someone can discuss it in a more-suitable forum -- what forum would that be, and would Wikipedia accept references to an anonymous forum even then? The fact remains that there are clearly much better mechanisms on Windows, virtual machine architectures, etc. used by serious backup programs for fine-grained change tracking that is essential to their use cases, as anyone reasonably experienced in backup systems knows. Citing it as a deficiency of inotify seems reasonable to me, but Wikipedia.2601:681:300:F185:8C6F:27C9:6219:B69E (talk) 13:36, 22 August 2015 (UTC)
An easy-to-make public reference and comparison is fschange, which was offered as an alternative to dnotify and inotify. The first paragraph in the description that comes up if you google it talks about the shortcomings of inotify, inability to know what part of the file has actually been modified. It is really too bad that a more fschange-like approach was not chosen, and even sadder that these apparent significant deficiencies of inotify are not at least acknowledged in the descriptions. 2601:681:300:F185:8C6F:27C9:6219:B69E (talk) 14:22, 22 August 2015 (UTC)
The things you're describing make sense, but AFAIK there are no "advanced" backup solutions on Linux different from those using ctime and mtime. Could you, please, name a few backup solutions that use inotify internally, besides lsync I've linked above, which is a mirroring utility? I'd really like to have a look at them. Speaking about references, forum posts aren't considered reliable sources; please see WP:RS for more information on what is accepted as sources on Wikipedia. Speaking about complex directory hierarchies and inefficiencies caused by scanning entire file systems for ctime and mtime values, a similar inefficiency would be caused by having a backup utility collect all file system changes (and even more by tracking all changes at the file content level) over a 24-hour period for such busy complex file system hierarchies. — Dsimic (talk | contribs) 17:05, 22 August 2015 (UTC)
Moreover, more advanced file systems already contain mechanisms to determine changes made to them between two points in time, please see the features of Btrfs usable for incremental backups, for example. — Dsimic (talk | contribs) 17:20, 22 August 2015 (UTC)