On 2019-01-31 12:38, Ronald Schaten wrote:
Hello everybody...
I'm looking for a solution to track file changes on a fairly large
filesystem. Many thousands of directories, millions of files.
The volume is shared to other computers, changes can come from
different
sources (NFS, Samba, local access...). So I think the kernel or the
filesystem itself are the definitive source of information.
Does BTRFS have any mechanism that could be used to track every event?
Or do you happen to know if the kernel does?
What I tried till now:
- inotify: Doesn't work for a full volume, just for single inodes.
- fanotify: That's almost the solution, but I need to see rename and
delete events, too.
- btrfs subvolume find-new: As far as I know that only finds changes
between snapshots. I need something a little more real-timey, and I
have to know if the file has been changed once or several times.
As I said: I'm thankful for any hint... thanks in advance!
As far as I know btrfs doesn't have any hooks you could use for that,
but perhaps have a look at a utility called inotifywait instead.
--
Steve