简体   繁体   中英

Does inotify work with kubernetes storage?

if I have a linux process running in a kube.netes container, can I rely on inotify working correctly when files are created on an attached storage volume? Are there any limitations?

The inotify mechanism works in the container and Kube.netes. Inotify develops a mechanism for monitoring events in the file system that monitors individual files and directories. It will report events for both the directory itself and the files in it as it monitors the directory.

Limitations imposed by inotify:

  1. Inotify can only be used with the Linux Operating System because it is a subsystem of the Linux kernel.

  2. Since recursively watching Inotify does not support directories, each subdirectory requires its own inotify watch. In contrast, the inotifywait command does enable recursive directory monitoring.

  3. In sysfs and procfs, Inotify does report some events, but not all of them.

  4. In.networked filesystems like NFS, where changes made by one client are not immediately broadcast to other clients, notification via inotify requires the kernel to be aware of all relevant filesystem events.

  5. Rename events are not directly handled; ie, inotify concerns two distinct events that must be investigated and matched in the context of possible race conditions.

For more detailed information you can refer to these articles:

Article1

Article2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM