我尝试按照以下链接在 Centos 7.5 主机上安装多路径,例如
https://www.learnitguide.net/2016/06/how-to-configure-multipathing-in-linux.html
我担心我错过了一些东西,因为“ssm list”的输出表明:
ssm list
--------------------------------------------------------------
Device Free Used Total Pool Mount point
--------------------------------------------------------------
/dev/sda 222.59 GB PARTITIONED
/dev/sda1 1.00 GB /boot
/dev/sda2 167.58 GB 54.00 GB 221.58 GB centos
/dev/sdb 200.00 GB
/dev/sdc 200.00 GB
/dev/sdd 1.00 TB
/dev/sde 1.00 TB
/dev/sdf 1.17 TB
/dev/sdg 1.17 TB
/dev/sdh 200.00 GB
/dev/sdi 200.00 GB
/dev/sdj 1.00 TB
/dev/sdk 1.00 TB
/dev/sdl 1.17 TB
/dev/sdm 1.17 TB
/dev/sdn 200.00 GB
/dev/sdo 200.00 GB
/dev/sdp 1.00 TB
/dev/sdq 1.00 TB
/dev/sdr 1.17 TB
/dev/sds 1.17 TB
/dev/sdt 200.00 GB
/dev/sdu 200.00 GB
/dev/sdv 1.00 TB
/dev/sdw 1.00 TB
/dev/sdx 1.17 TB
/dev/sdy 1.17 TB
--------------------------------------------------------------
-----------------------------------------------------
Pool Type Devices Free Used Total
-----------------------------------------------------
centos lvm 1 167.58 GB 54.00 GB 221.58 GB
-----------------------------------------------------
--------------------------------------------------------------------------------------
Volume Pool Volume size FS FS size Free Type Mount point
--------------------------------------------------------------------------------------
/dev/centos/root centos 50.00 GB xfs 49.98 GB 47.89 GB linear /
/dev/centos/swap centos 4.00 GB linear
/dev/sda1 1.00 GB xfs 1014.00 MB 732.00 MB part /boot
--------------------------------------------------------------------------------------
认为安装 dm-multipath 时操作系统会隐藏多个 /dev/sd* 设备吗?
几个输出:
多路径-l:
3600a098038303561325d474f4b597539 dm-3 NETAPP ,LUN C-Mode
size=1.0T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| |- 1:0:1:1 sdk 8:160 active undef unknown
| |- 1:0:3:1 sdw 65:96 active undef unknown
| |- 8:0:1:1 sdj 8:144 active undef unknown
| `- 8:0:2:1 sdp 8:240 active undef unknown
`-+- policy='service-time 0' prio=0 status=enabled
|- 1:0:0:1 sde 8:64 active undef unknown
|- 1:0:2:1 sdq 65:0 active undef unknown
|- 8:0:0:1 sdd 8:48 active undef unknown
`- 8:0:3:1 sdv 65:80 active undef unknown
san_disk1 (3600a098038303561325d474f4b59752d) dm-4 NETAPP ,LUN C-Mode
size=1.2T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| |- 1:0:1:2 sdm 8:192 active undef unknown
| |- 1:0:3:2 sdx 65:112 active undef unknown
| |- 8:0:1:2 sdl 8:176 active undef unknown
| `- 8:0:2:2 sdr 65:16 active undef unknown
`-+- policy='service-time 0' prio=0 status=enabled
|- 1:0:0:2 sdg 8:96 active undef unknown
|- 1:0:2:2 sds 65:32 active undef unknown
|- 8:0:0:2 sdf 8:80 active undef unknown
`- 8:0:3:2 sdy 65:128 active undef unknown
3600a098038303561325d474f4b597538 dm-2 NETAPP ,LUN C-Mode
size=200G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=0 status=active
| |- 1:0:1:0 sdi 8:128 active undef unknown
| |- 1:0:3:0 sdu 65:64 active undef unknown
| |- 8:0:1:0 sdh 8:112 active undef unknown
| `- 8:0:2:0 sdn 8:208 active undef unknown
`-+- policy='service-time 0' prio=0 status=enabled
|- 1:0:0:0 sdc 8:32 active undef unknown
|- 1:0:2:0 sdo 8:224 active undef unknown
|- 8:0:0:0 sdb 8:16 active undef unknown
`- 8:0:3:0 sdt 65:48 active undef unknown
多路径-ll
3600a098038303561325d474f4b597539 dm-3 NETAPP ,LUN C-Mode
size=1.0T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:1 sdk 8:160 active ready running
| |- 1:0:3:1 sdw 65:96 active ready running
| |- 8:0:1:1 sdj 8:144 active ready running
| `- 8:0:2:1 sdp 8:240 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:0:1 sde 8:64 active ready running
|- 1:0:2:1 sdq 65:0 active ready running
|- 8:0:0:1 sdd 8:48 active ready running
`- 8:0:3:1 sdv 65:80 active ready running
san_disk1 (3600a098038303561325d474f4b59752d) dm-4 NETAPP ,LUN C-Mode
size=1.2T features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:2 sdm 8:192 active ready running
| |- 1:0:3:2 sdx 65:112 active ready running
| |- 8:0:1:2 sdl 8:176 active ready running
| `- 8:0:2:2 sdr 65:16 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:0:2 sdg 8:96 active ready running
|- 1:0:2:2 sds 65:32 active ready running
|- 8:0:0:2 sdf 8:80 active ready running
`- 8:0:3:2 sdy 65:128 active ready running
3600a098038303561325d474f4b597538 dm-2 NETAPP ,LUN C-Mode
size=200G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:0 sdi 8:128 active ready running
| |- 1:0:3:0 sdu 65:64 active ready running
| |- 8:0:1:0 sdh 8:112 active ready running
| `- 8:0:2:0 sdn 8:208 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
|- 1:0:0:0 sdc 8:32 active ready running
|- 1:0:2:0 sdo 8:224 active ready running
|- 8:0:0:0 sdb 8:16 active ready running
`- 8:0:3:0 sdt 65:48 active ready running
cat /etc/multipath.conf defaults { user_friendly_names yes #path_grouping_policy multibus find_multipaths yes path_grouping_policy failover }
blacklist {
devnode "sda"
}
multipaths {
multipath {
wwid 3600a098038303561325d474f4b59752d
alias san_disk1
}
}
服务多路径状态
Redirecting to /bin/systemctl status multipathd.service
● multipathd.service - Device-Mapper Multipath Device Controller
Loaded: loaded (/usr/lib/systemd/system/multipathd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-07-09 12:12:27 CEST; 2min 19s ago
Process: 19275 ExecStart=/sbin/multipathd (code=exited, status=0/SUCCESS)
Process: 19272 ExecStartPre=/sbin/multipath -A (code=exited, status=0/SUCCESS)
Process: 19268 ExecStartPre=/sbin/modprobe dm-multipath (code=exited, status=0/SUCCESS)
Main PID: 19277 (multipathd)
Tasks: 9
CGroup: /system.slice/multipathd.service
└─19277 /sbin/multipathd
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local systemd[1]: Starting Device-Mapper Multipath Device Controller...
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local systemd[1]: Started Device-Mapper Multipath Device Controller.
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: 3600a098038303561325d474f4b597538: load table [0 419430400 multipath 4 queue_if_no_path pg...65:48 1]
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: 3600a098038303561325d474f4b597539: load table [0 2147518464 multipath 4 queue_if_no_path p...65:80 1]
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: san_disk1: load table [0 2516901888 multipath 4 queue_if_no_path pg_init_retries 50 retain...5:128 1]
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: 3600a098038303561325d474f4b597538: event checker started
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: 3600a098038303561325d474f4b597539: event checker started
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: san_disk1: event checker started
Jul 09 12:12:27 VIGT01-101.res01.ads.ooe.local multipathd[19277]: path checkers start up
Hint: Some lines were ellipsized, use -l to show in full.
答案1
没关系。底层设备没有被任何方式隐藏。