Say you want to promptly duplicate what ever has been writ to your
disk on another disk, or remote drive or cloud drive or whatever.
'inotify' and its kin can tell you what's changed,
but it's basically a POLLING sort of operation and
including an entire drive would be insanely slow.
It's a sort of localized rsync daemon.
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
SoftRAID software does seem to tap into something like this, so it's
THERE, somewhere. I tried looking at softRAID code but it's huge and
only just so well documented. No luck - I can't find what it's
looking at - kernel, driver, who knows ?
c186282 <c186282@nnada.net> wrote:
Say you want to promptly duplicate what ever has been writ to your
disk on another disk, or remote drive or cloud drive or whatever.
'inotify' and its kin can tell you what's changed,
Yep, that is its purpose.
but it's basically a POLLING sort of operation and
Incorrect. Inotify is an event driven system. There is no polling
(using the standard definiton of "polling" [1]) going on for inotify
events.
including an entire drive would be insanely slow.
Yes, but only because setting up the inotify notifications would take a
while to do, and likely need a fair amount of kernel ram to store them.
But once setup, there is no polling of any form going on.
It's a sort of localized rsync daemon.
Completely wrong, in so many ways.
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
Inotify.
SoftRAID software does seem to tap into something like this, so it's
THERE, somewhere. I tried looking at softRAID code but it's huge and
only just so well documented. No luck - I can't find what it's
looking at - kernel, driver, who knows ?
Unless it installs a custom kernel module (unlikely) then it is most
likely using the inotify subsystem.
[1] https://en.wikipedia.org/wiki/Polling_(computer_science)
But as you are well known for having made up your own non-standard definitions for CS terms, I felt the need to point to the standard definition.
c186282 <c186282@nnada.net> wrote:
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
Inotify.
Rich <rich@example.invalid> writes:
c186282 <c186282@nnada.net> wrote:
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
Inotify.
Not really. inotify monitors individual files or directories. It is not really suitable for the task which c186282 has in mind, which is
monitoring entire filesystems for changes.
For whole-system monitoring, you want fanotify.
* https://man7.org/linux/man-pages/man7/fanotify.7.html
* https://lwn.net/Articles/339399/
On 4/7/26 23:58, Rich wrote:
c186282 <c186282@nnada.net> wrote:
Say you want to promptly duplicate what ever has been writ to your
disk on another disk, or remote drive or cloud drive or whatever.
'inotify' and its kin can tell you what's changed,
Yep, that is its purpose.
but it's basically a POLLING sort of operation and
Incorrect. Inotify is an event driven system. There is no polling
(using the standard definiton of "polling" [1]) going on for inotify
events.
including an entire drive would be insanely slow.
Yes, but only because setting up the inotify notifications would take a
while to do, and likely need a fair amount of kernel ram to store them.
But once setup, there is no polling of any form going on.
Ya SURE about that ???
I did some experiments a few years back and even if you added
"nothing happening" dirs the performance got worse.
It's a sort of localized rsync daemon.
Completely wrong, in so many ways.
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
Inotify.
SoftRAID software does seem to tap into something like this, so it's
THERE, somewhere. I tried looking at softRAID code but it's huge and
only just so well documented. No luck - I can't find what it's
looking at - kernel, driver, who knows ?
Unless it installs a custom kernel module (unlikely) then it is most
likely using the inotify subsystem.
Then RAID is essentially 'inotify("/","-r")' yet it's lightning
fast and doesn't use up all the kernel RAM doing it.
[1] https://en.wikipedia.org/wiki/Polling_(computer_science)
But as you are well known for having made up your own non-standard
definitions for CS terms, I felt the need to point to the standard
definition.
"Polling" in THIS case would mean reading all the file names/times
in a folder/subfolders and then reading them again X seconds later
to see if anything had changed. This could get very tedious if a
large folder is involved. I was looking for something a bit more
pro-active, only reporting what HAD changed without having to go
looking for it on the disk.
Rich <rich@example.invalid> writes:
c186282 <c186282@nnada.net> wrote:
Now SOMEWHERE Linux does put together a filename and destination as
it's about to write. The big question is where, and can users SEE
this ?
Inotify.
Not really. inotify monitors individual files or directories. It is not really suitable for the task which c186282 has in mind, which is
monitoring entire filesystems for changes.
For whole-system monitoring, you want fanotify.
* https://man7.org/linux/man-pages/man7/fanotify.7.html
* https://lwn.net/Articles/339399/
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,113 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492335:43:44 |
| Calls: | 14,238 |
| Files: | 186,312 |
| D/L today: |
3,558 files (1,159M bytes) |
| Messages: | 2,514,865 |