jordansissel/ruby-filewatch — pull request #25 by buckelij (2013-12-26 16:47:22+00:00)
Title: add option to ignore major and minor dev on inode

If you have a number of remote file systems mounted (via SMB in this case) and have a tail on a set of logs on those servers, remounting the remote file systems can cause tail to lose the position in the log, since the dev id numbers are determined at mount time.

For example:

stat mnt/a/1a.txt | grep Device
Device: 2ah/42d	Inode: 6755399441239548
stat mnt/b/1b.txt | grep Device
Device: 29h/41d	Inode: 9317666154052854272

After remounting in a different order:

stat mnt/a/1a.txt | grep Device
Device: 29h/41d	Inode: 6755399441239548
stat mnt/b/1b.txt | grep Device
Device: 2ah/42d	Inode: 9317666154052854272

The inode id is the same though, so we can choose to ignore the device id numbers. This patch implements the option to ignore device ids.

(Eventually, I'd like to see this option exposed in the logstash 'file' input.)