Lvm
多路徑到暫存 VM 中的邏輯卷
如何在測試 VM 中配置多路徑(目的純粹是學術性的)?
我新建了一個邏輯卷,修改
multipath.conf
如下:defaults { udev_dir /dev user_friendly_names yes } blacklist { } blacklist_exceptions { device { vendor "VMware," product "VMware Virtual S" } }
並
multipath -v3
說:Apr 22 03:22:24 | sdb: rev = 1.0 Apr 22 03:22:24 | sdb: h:b:t:l = 2:0:1:0 Apr 22 03:22:24 | (null): (VMware,:VMware Virtual S) vendor/product whitelisted Apr 22 03:22:24 | sdb: serial = Apr 22 03:22:24 | sdb: get_state Apr 22 03:22:24 | sdb: path checker = directio (config file default) Apr 22 03:22:24 | sdb: checker timeout = 180000 ms (sysfs setting) Apr 22 03:22:24 | sdb: state = running Apr 22 03:22:24 | directio: starting new request Apr 22 03:22:24 | directio: io finished 4096/0 Apr 22 03:22:24 | sdb: state = 3 Apr 22 03:22:24 | sdb: getuid = /lib/udev/scsi_id --whitelisted --device=/dev/%n (config file default) Apr 22 03:22:24 | /lib/udev/scsi_id exitted with 1 Apr 22 03:22:24 | error calling out /lib/udev/scsi_id --whitelisted --device=/dev/sdb Apr 22 03:22:24 | sdb: state = running Apr 22 03:22:24 | /lib/udev/scsi_id exitted with 1 Apr 22 03:22:24 | error calling out /lib/udev/scsi_id --whitelisted --device=/dev/sdb Apr 22 03:22:24 | sdb: detect_prio = 1 (config file default) Apr 22 03:22:24 | sdb: prio = const (config file default) Apr 22 03:22:24 | sdb: const prio = 1 Apr 22 03:22:24 | dm-0: device node name blacklisted Apr 22 03:22:24 | dm-1: device node name blacklisted Apr 22 03:22:24 | dm-2: device node name blacklisted ===== paths list ===== uuid hcil dev dev_t pri dm_st chk_st vend/prod/rev dev_st 2:0:0:0 sda 8:0 1 undef ready VMware,,VMware Virtual S running 2:0:1:0 sdb 8:16 1 undef ready VMware,,VMware Virtual S running [root@localhost ~]#
我想為邏輯卷配置多路徑
/dev/sdb
。我的黑名單是空的,為什麼說
dm-0/1/2
被列入黑名單?此外,當我
lib/udev/scsi_id --whitelisted --device=/dev
手動執行時,我沒有收到任何錯誤。沒有輸出或變化,但……
試試這個
multipathd -k show config
在我的系統上,似乎忽略了一個空的黑名單,除了供應商列入黑名單的設備外,它還包含這些 devnodes 模式:
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "^hd[a-z]" devnode "^dcssblk[0-9]*"
它匹配“dm-”
您可以嘗試將“dm-1, dm-2 ..” devnodes 添加到黑名單異常中。我從未嘗試過。例如,如果您在多路徑 dm 文件上放置異常,我不知道會產生什麼影響。