一、组网图
IP-SAN,两条路径挂载5个LUN。
二、问题描述
RedHat 6.4 内核2.6.32,通过IP-SAN、FC-SAN多路径进行挂载的卷,多路径配置文件和链路均正常,执行multipath -ll 结果显示未聚合,执行multipath -v3 看到路径优先级为-1。
lsblk 执行结果,可以看到10个块设备,属于正常: [root@example ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 80G 0 disk ├─sda1 8:1 0 200M 0 part /boot ├─sda2 8:2 0 4G 0 part [SWAP] └─sda3 8:3 0 75.8G 0 part / sr0 11:0 1 3.5G 0 rom sdb 8:16 0 32G 0 disk sdh 8:112 0 32G 0 disk sdi 8:128 0 32G 0 disk sdc 8:32 0 32G 0 disk sdk 8:160 0 32G 0 disk sdj 8:144 0 32G 0 disk sdd 8:48 0 32G 0 disk sde 8:64 0 32G 0 disk sdf 8:80 0 32G 0 disk sdg 8:96 0 32G 0 disk fdisk 查看结果无法看到,属于异常现象: [root@example ~]# fdisk -l |grep sd Disk /dev/sda: 85.9 GB, 85899345920 bytes /dev/sda1 * 1 26 204800 83 Linux /dev/sda2 26 548 4194304 82 Linux swap / Solaris /dev/sda3 548 10444 79485952 83 Linux multipath 结果聚合失败: [root@example ~]# multipath -ll [root@example ~]# multipath -v3 …… ===== paths list ===== uuid hcil dev dev_t pri dm_st chk_st vend/prod/rev dev_st 34:0:0:0 sdb 8:16 -1 undef faulty MacroSAN,LU running 34:0:0:1 sdh 8:112 -1 undef faulty MacroSAN,LU running 34:0:0:2 sdi 8:128 -1 undef faulty MacroSAN,LU running 33:0:0:0 sdc 8:32 -1 undef faulty MacroSAN,LU running 34:0:0:4 sdk 8:160 -1 undef faulty MacroSAN,LU running 34:0:0:3 sdj 8:144 -1 undef faulty MacroSAN,LU running 33:0:0:1 sdd 8:48 -1 undef faulty MacroSAN,LU running 33:0:0:2 sde 8:64 -1 undef faulty MacroSAN,LU running 33:0:0:3 sdf 8:80 -1 undef faulty MacroSAN,LU running 33:0:0:4 sdg 8:96 -1 undef faulty MacroSAN,LU running
三、过程分析
1、结合lsblk可以看到所有路径的块设备,说明链路没有问题。
2、fdisk 和 multipath -ll 的结果吻合,都没有识别到块设备,multipath -v3打印结果看到所有路径优先级均为-1,说明块设备受到其他配置文件干扰导致。
3、检查/etc/udev/rules.d目录下udev规则,KERNEL=="sd*"写法不规范。
[root@example ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="sd*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342c3f4c12edb334de162d0000d2", NAME="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b3428110527cddd1ad85efd0000d2", NAME="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342418056fcd5257d9fa1d0000d2", NAME="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b3424724b473d5ed7db4f9d0000d2", NAME="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="sd*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342aef41ca7d4f89d7473d0000d2", NAME="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"
四、解决方法
1、将内核设备名称修改为KERNEL=="dm-*",保证当udev规则生效后,不影响multipath多路径聚合。
[root@example rules.d]# vi 99-oracle-asmdevices.rules [root@example rules.d]# cat 99-oracle-asmdevices.rules KERNEL=="dm-*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342c3f4c12edb334de162d0000d2", NAME="asm-diskb", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm-*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b3428110527cddd1ad85efd0000d2", NAME="asm-diskc", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm-*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342418056fcd5257d9fa1d0000d2", NAME="asm-diskd", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm-*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b3424724b473d5ed7db4f9d0000d2", NAME="asm-diske", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm-*", BUS=="scsi",PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name",RESULT=="3600b342aef41ca7d4f89d7473d0000d2", NAME="asm-diskf", OWNER="grid", GROUP="asmadmin", MODE="0660"2、重新加载udev规则,检查multipath聚合没有受到影响。
[root@example rules.d]# udevadm control --reload-rules [root@example rules.d]# start_udev -----重新加载udev规则 Starting udev: [ OK ] [root@example rules.d]# fdisk -l |grep sd Disk /dev/sda: 85.9 GB, 85899345920 bytes /dev/sda1 * 1 26 204800 83 Linux /dev/sda2 26 548 4194304 82 Linux swap / Solaris /dev/sda3 548 10444 79485952 83 Linux Disk /dev/sdb: 34.4 GB, 34359738368 bytes Disk /dev/sdc: 34.4 GB, 34359738368 bytes Disk /dev/sdg: 34.4 GB, 34359738368 bytes Disk /dev/sdf: 34.4 GB, 34359738368 bytes Disk /dev/sdi: 34.4 GB, 34359738368 bytes Disk /dev/sdh: 34.4 GB, 34359738368 bytes Disk /dev/sde: 34.4 GB, 34359738368 bytes Disk /dev/sdj: 34.4 GB, 34359738368 bytes Disk /dev/sdd: 34.4 GB, 34359738368 bytes Disk /dev/sdk: 34.4 GB, 34359738368 bytes [root@example rules.d]# multipath -v3 ===== paths list ===== uuid hcil dev dev_t pri dm_st chk_st vend/pro 3600b342c3f4c12edb334de162d0000d2 37:0:0:0 sdb 8:16 50 undef ready MacroSAN 3600b342c3f4c12edb334de162d0000d2 38:0:0:0 sdc 8:32 10 undef ready MacroSAN 3600b3424724b473d5ed7db4f9d0000d2 38:0:0:3 sdg 8:96 50 undef ready MacroSAN 3600b342418056fcd5257d9fa1d0000d2 38:0:0:2 sdf 8:80 10 undef ready MacroSAN 3600b342aef41ca7d4f89d7473d0000d2 38:0:0:4 sdi 8:128 10 undef ready MacroSAN 3600b342418056fcd5257d9fa1d0000d2 37:0:0:2 sdh 8:112 50 undef ready MacroSAN 3600b3428110527cddd1ad85efd0000d2 37:0:0:1 sde 8:64 10 undef ready MacroSAN 3600b3424724b473d5ed7db4f9d0000d2 37:0:0:3 sdj 8:144 10 undef ready MacroSAN 3600b3428110527cddd1ad85efd0000d2 38:0:0:1 sdd 8:48 50 undef ready MacroSAN 3600b342aef41ca7d4f89d7473d0000d2 37:0:0:4 sdk 8:160 50 undef ready MacroSAN [root@example rules.d]# multipath -ll mpathe (3600b342aef41ca7d4f89d7473d0000d2) dm-2 MacroSAN,LU size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 37:0:0:4 sdk 8:160 active ready running `-+- policy='round-robin 0' prio=10 status=enabled `- 38:0:0:4 sdi 8:128 active ready running mpathd (3600b342c3f4c12edb334de162d0000d2) dm-4 MacroSAN,LU size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 37:0:0:0 sdb 8:16 active ready running `-+- policy='round-robin 0' prio=10 status=enabled `- 38:0:0:0 sdc 8:32 active ready running mpathc (3600b342418056fcd5257d9fa1d0000d2) dm-3 MacroSAN,LU size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 37:0:0:2 sdh 8:112 active ready running `-+- policy='round-robin 0' prio=10 status=enabled `- 38:0:0:2 sdf 8:80 active ready running mpathb (3600b3424724b473d5ed7db4f9d0000d2) dm-1 MacroSAN,LU size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 38:0:0:3 sdg 8:96 active ready running `-+- policy='round-robin 0' prio=10 status=enabled `- 37:0:0:3 sdj 8:144 active ready running mpatha (3600b3428110527cddd1ad85efd0000d2) dm-0 MacroSAN,LU size=32G features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | `- 38:0:0:1 sdd 8:48 active ready running `-+- policy='round-robin 0' prio=10 status=enabled `- 37:0:0:1 sde 8:64 active ready running
五、风险提示
1、涉及修改udev的规则文件,必须由数据库工程师审核后,由数据库工程师操作。
2、执行重新加载udev的命令前,请协调停止数据库业务;若加载不生效,还需要协调重启操作系统才能生效。
修改日期 | 修改人 | 备注 |
2019-05-24 09:59:38[当前版本] | 黄歌程 | 其他原因...风险提示和组网图 |
2019-05-21 15:20:16 | 黄歌程 | CREAT |
附件类型 | PNG |
|