我怎样才能让 multipathd 停止监控我的磁盘?

我怎样才能让 multipathd 停止监控我的磁盘?

我正在从单个 nvme 磁盘启动 Ubuntu 服务器 20.04。从几天前开始,多路径就一直向我的系统日志发送以下消息:

Jun 11 20:10:14 xb multipath: nvme0n1: failed to get udev uid: Invalid argument
Jun 11 20:10:14 xb multipath: nvme0n1: uid = eui.0000000001000000e4d25c7f117c5001 (sysfs)
Jun 11 20:10:17 xb multipath: nvme0n1: failed to get udev uid: Invalid argument
Jun 11 20:10:17 xb multipath: nvme0n1: uid = eui.0000000001000000e4d25c7f117c5001 (sysfs)
Jun 11 20:10:20 xb multipath: nvme0n1: failed to get udev uid: Invalid argument
Jun 11 20:10:20 xb multipath: nvme0n1: uid = eui.0000000001000000e4d25c7f117c5001 (sysfs)
Jun 11 20:11:34 xb multipath: nvme0n1: failed to get udev uid: Invalid argument
Jun 11 20:11:34 xb multipath: nvme0n1: uid = eui.0000000001000000e4d25c7f117c5001 (sysfs)
Jun 11 20:11:37 xb multipath: nvme0n1: failed to get udev uid: Invalid argument
Jun 11 20:11:37 xb multipath: nvme0n1: uid = eui.0000000001000000e4d25c7f117c5001 (sysfs)

我可以获取以下设备列表来确认它监控我的 nvme 磁盘:

multipathd> show devices
available block devices:
loop1 devnode blacklisted, unmonitored
nvme0n1 devnode whitelisted, monitored
loop6 devnode blacklisted, unmonitored
loop4 devnode blacklisted, unmonitored
loop2 devnode blacklisted, unmonitored
loop0 devnode blacklisted, unmonitored
loop7 devnode blacklisted, unmonitored
loop5 devnode blacklisted, unmonitored
loop3 devnode blacklisted, unmonitored
multipathd> 

我尝试了以下命令:

remove map nvme0n1

但收到消息:失败

所以现在的问题是,我怎样才能让它停止监视我的 nvme 磁盘并向 syslog 发送垃圾邮件?

答案1

看来解决方案是将黑名单添加到文件,/etc/multipath.conf如下所示:

defaults {
    user_friendly_names yes
} 
blacklist {
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st|sd|mmc|nvme)[a-z0-9]*"
}

这有效地阻止了多路径向系统日志发送垃圾邮件。

相关内容