如何确保 RHEL 重启后可以看到多路径磁盘?

如何确保 RHEL 重启后可以看到多路径磁盘?

我们正在使用 RHEL,但不幸的是,它存在多路径问题。

似乎并非所有 SAN 磁盘在重启后都会自动显示。需要重新加载服务多路径,操作系统才能看到磁盘。

root@test-01 ~]# ls -al /dev/mapper/ total 0
drwxr-xr-x.  2 root root     480 May 31 13:17 .
drwxr-xr-x. 21 root root    5500 May 31 13:20 ..
crw-rw----.  1 root root  10, 58 May 31 13:17 control
brw-rw----.  1 root disk 253, 16 May 31 13:17 TS_DATA_DISK000p1 
brw-rw----.  1 root disk 253, 14 May 31 13:17 TS_DATA_DISK001p1
brw-rw----.  1 root disk 253,  7 May 31 13:17 TS_DATA_DISK002p1 
brw-rw----.  1 root disk 253,  9 May 31 13:17 TS_DATA_DISK003p1
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_BEL_DISK000p1 -> ../dm-15
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_BEL_DISK001p1 -> ../dm-17
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_BEL_DISK002p1 -> ../dm-22
lrwxrwxrwx.  1 root root       7 May 31 13:17 TS_BEL_DISK003 -> ../dm-5
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_BEL_DISK003p1 -> ../dm-12
brw-rw----.  1 root disk 253, 23 May 31 13:17 TS_JPG_DISK000p1
brw-rw----.  1 root disk 253, 18 May 31 13:17 TS_JPG_DISK001p1
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_JPG_DISK002 -> ../dm-21
lrwxrwxrwx.  1 root root       8 May 31 13:17 TS_JPG_DISK002p1 -> ../dm-24
lrwxrwxrwx.  1 root root       8 May 31 13:17 mpathb -> ../dm-25
lrwxrwxrwx.  1 root root       8 May 31 13:17 mpathbp1 -> ../dm-26
lrwxrwxrwx.  1 root root       8 May 31 13:17 vg00-lvhome -> ../dm-30
lrwxrwxrwx.  1 root root       7 May 31 13:17 vg00-lvroot -> ../dm-1
lrwxrwxrwx.  1 root root       7 May 31 13:17 vg00-lvswap -> ../dm-0
lrwxrwxrwx.  1 root root       8 May 31 13:17 vg00-lvtmp -> ../dm-29
lrwxrwxrwx.  1 root root       8 May 31 13:17 vg00-lvvar -> ../dm-28
lrwxrwxrwx.  1 root root       8 May 31 13:17 vg_app-lv_d01_app -> ../dm-27
[root@test-01 ~]# service multipathd reload
Reloading multipathd:                                      [  OK  ]
[root@test-01 ~]# ls -al /dev/mapper total 0
drwxr-xr-x.  2 root root    680 May 31 13:22 .
drwxr-xr-x. 21 root root   5500 May 31 13:22 ..
crw-rw----.  1 root root 10, 58 May 31 13:17 control
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_DATA_DISK000 -> ../dm-10
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_DATA_DISK000p1 -> ../dm-16
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_DATA_DISK001 -> ../dm-6
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_DATA_DISK001p1 -> ../dm-14
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_DATA_DISK002 -> ../dm-3
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_DATA_DISK002p1 -> ../dm-7
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_DATA_DISK003 -> ../dm-4
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_DATA_DISK003p1 -> ../dm-9
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_BEL_DISK000 -> ../dm-8
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK000p1 -> ../dm-15
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK001 -> ../dm-11
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK001p1 -> ../dm-17
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK002 -> ../dm-19
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK002p1 -> ../dm-22
lrwxrwxrwx.  1 root root      7 May 31 13:22 TS_BEL_DISK003 -> ../dm-5
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_BEL_DISK003p1 -> ../dm-12
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK000 -> ../dm-20
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK000p1 -> ../dm-23
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK001 -> ../dm-13
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK001p1 -> ../dm-18
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK002 -> ../dm-21
lrwxrwxrwx.  1 root root      8 May 31 13:22 TS_JPG_DISK002p1 -> ../dm-24
lrwxrwxrwx.  1 root root      8 May 31 13:22 mpathb -> ../dm-25
lrwxrwxrwx.  1 root root      8 May 31 13:22 mpathbp1 -> ../dm-26
lrwxrwxrwx.  1 root root      7 May 31 13:22 d01 -> ../dm-2
lrwxrwxrwx.  1 root root      8 May 31 13:17 vg00-lvhome -> ../dm-30
lrwxrwxrwx.  1 root root      7 May 31 13:17 vg00-lvroot -> ../dm-1
lrwxrwxrwx.  1 root root      7 May 31 13:17 vg00-lvswap -> ../dm-0
lrwxrwxrwx.  1 root root      8 May 31 13:17 vg00-lvtmp -> ../dm-29
lrwxrwxrwx.  1 root root      8 May 31 13:17 vg00-lvvar -> ../dm-28
lrwxrwxrwx.  1 root root      8 May 31 13:17 vg_app-lv_d01_app -> ../dm-27
[root@test-01 ~]#

如何确保 RHEL 在重启后可以看到多路径磁盘,而无需手动运行 service multipathd reload?

答案1

如果您对 进行了更改/etc/multipath.conf但未重新创建 initrd,您可以随时尝试重新创建 initrd。这和确保 multipathd 守护进程正在运行 ( chkconfig multipathd on) 应该足以应付我见过的大多数情况。

我不知道您使用什么存储,但如果存储/HBA 模块在multipathd最初启动后加载,那么这也可能是一个问题。

相关内容