CIFS: Attempting to mount が出力される

【環境】
$ cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

$ rpm -qa | grep autofs
autofs-5.1.4-40.el8.x86_64


CentOS 8のautofs でCIFSマウントしていたら、/var/log/messages に以下のようなログが出る。

Oct 25 21:40:01 cent8 kernel: CIFS: Attempting to mount //192.168.1.5/path


マウントする度に出るようなので、rsyslog 側で無視するようにする。

やり方は、先日の記事と同じ。
shobon.hatenablog.com



/etc/rsyslog.d 以下にファイル(任意のファイル名.conf )を作成し、無視するよう設定を記載。

# cat /etc/rsyslog.d/ignore-kernel-cifs-attempting.conf
if $programname == "kernel" and ($msg contains "CIFS: Attempting to mount") then stop

rsyslogを再起動

# systemctl restart rsyslog