主机A:被备份的源主机
主机B:备份的目的主机
- 在linux内核中,默认的inotify机制提供了三个调控参数
[root@fudanwuxi html]# uname -r
3.10.0-693.el7.x86_64
[root@fudanwuxi html]# ll /proc/sys/fs/inotify/
total 0
-rw-r--r--. 1 root root 0 Aug 25 09:32 max_queued_events #监控事件队列
-rw-r--r--. 1 root root 0 Aug 25 09:32 max_user_instances #最多监控实例数
-rw-r--r--. 1 root root 0 Aug 25 09:32 max_user_watches #每个实例最多监控文件数
[root@fudanwuxi html]# cat /proc/sys/fs/inotify/max_queued_events
16384
[root@fudanwuxi html]# cat /proc/sys/fs/inotify/max_user_instances
128
[root@fudanwuxi html]# cat /proc/sys/fs/inotify/max_user_watches
8192
- 当要监控的目录、文件数量较多或者变化较频繁时,要加大这三个参数的值
[root@fudanwuxi html]# vim /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.inotify.max_queued_events = 32768
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 305564824
~
[root@fudanwuxi html]# sysctl -p
fs.inotify.max_queued_events = 32768
fs.inotify.max_user_instances = 1024
fs.inotify.max_user_watches = 305564824
[root@fudanwuxi html]# cat /proc/sys/fs/inotify/max_queued_events
32768
[root@fudanwuxi html]