linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Davies <btrfs-list@steev.me.uk>
To: Ronald Schaten <ronald@schatenseite.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: File alteration events?
Date: Thu, 31 Jan 2019 13:08:41 +0000	[thread overview]
Message-ID: <b4edb2f4c2fda608833ea4600c6ea258@steev.me.uk> (raw)
In-Reply-To: <20190131123832.yqhp4fqavv6xjdif@shell.intra.scheunentor.de>

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

  reply	other threads:[~2019-01-31 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-31 12:38 File alteration events? Ronald Schaten
2019-01-31 13:08 ` Steven Davies [this message]
2019-01-31 14:06 ` Austin S. Hemmelgarn
2019-01-31 15:06 ` Nikolay Borisov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4edb2f4c2fda608833ea4600c6ea258@steev.me.uk \
    --to=btrfs-list@steev.me.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=ronald@schatenseite.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).