4

I asked a question on codereview to know if I could safely replace the following code:

:inode => [stat.ino, stat.dev_major, stat.dev_minor],

which threw NotImplementedError because of jruby not retrieving the stat implementation for dev_major/dev_minor on Solaris, by

:inode => [stat.ino, nil, nil],

and from their explanation I understood that if I operate on a single hard drive it is ok, but if my files are spread on multiple hard drives, there is a (small) risk of collision with two inodes being the same number.

But in my case, all logs files from every servers are mounted in the same directory through NFS, so I was wondering if when accessing the files, the inode numbers retrieved by ruby would be the actual inode numbers of the remote files, or a "local" inode number of the NFS link, in which case I would be safe to operate.

BTW I am not very familiar with those notions and english is not my mother language, so I apologize if I am being unclear.

Thanks for your help

Marco
  • 233
  • 2
  • 8
Aldian
  • 163

1 Answers1

2

The inode numbers come from the NFS servers (the systems that contain the log files). The system your ruby application is running on is a NFS client. So, yes, there is the potential for inode number collisions.