Device Mutipath参数设置

简介:

相信做过Mutipath Device的童鞋对multipath.conf并不陌生。不错,这个是DM的配置文件。初次配置DM可以不修改配置文件中的任何内容,它会默认加载,当然用的参数也是默认的。有些时候我们的存储并不支持默认的配置,或者默认的配置并不适合存储的需求,这就需要对默认的参数做些修改。

 

    下面看一下默认mutipath.conf的内容:

[root@ProsDB01 etc]# more multipath.conf
# This is a basic configuration file with some examples, for device mapper
# multipath.
# For a complete list of the default configuration values, see
# /usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.defaults
# For a list of configuration options with descriptions, see
# /usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.annotated


# Blacklist all devices by default. Remove this to enable multipathing
# on the default devices.
blacklist {
        devnode "*"
}

## By default, devices with vendor = "IBM" and product = "S/390.*" are
## blacklisted. To enable mulitpathing on these devies, uncomment the
## following lines.
#blacklist_exceptions {
#       device {
#               vendor  "IBM"
#               product "S/390.*"
#       }
#}

## Use user friendly names, instead of using WWIDs as names.
defaults {
        user_friendly_names yes
}
##
## Here is an example of how to configure some standard options.
##
#
#defaults {
#       udev_dir                /dev
#       polling_interval        10
#       selector                "round-robin 0"
#       path_grouping_policy    multibus
#       getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
#       prio_callout            /bin/true
#       path_checker            readsector0
#       rr_min_io               100
#       max_fds                 8192
#       rr_weight               priorities
#       failback                immediate
#       no_path_retry           fail
#       user_friendly_names     yes
#}
##
## The wwid line in the following blacklist section is shown as an example
## of how to blacklist devices by wwid.  The 2 devnode lines are the
## compiled in default blacklist. If you want to blacklist entire types
## of devices, such as all scsi devices, you should use a devnode line.
## However, if you want to blacklist specific devices, you should use
## a wwid line.  Since there is no guarantee that a specific device will
## not change names on reboot (from /dev/sda to /dev/sdb for example)
## devnode lines are not recommended for blacklisting specific devices.
##
#blacklist {
#       wwid 26353900f02796769
#       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
#       devnode "^hd[a-z]"
#}
#multipaths {
#       multipath {
#               wwid                    3600508b4000156d700012000000b0000
#               alias                   yellow
#               path_grouping_policy    multibus
#               path_checker            readsector0
#               path_selector           "round-robin 0"
#               failback                manual
#               rr_weight               priorities
#               no_path_retry           5
#       }
#       multipath {
#               wwid                    1DEC_____321816758474
#               alias                   red
#       }
#}
#devices {
#       device {
#               vendor                  "COMPAQ  "
#               product                 "HSV110 (C)COMPAQ"
#               path_grouping_policy    multibus
#               getuid_callout          "/sbin/scsi_id -g -u -s /block/%n"
#               path_checker            readsector0
#               path_selector           "round-robin 0"
#               hardware_handler        "0"
#               failback                15
#               rr_weight               priorities
#               no_path_retry           queue
#       }
#       device {
#               vendor                  "COMPAQ  "
#               product                 "MSA1000         "
#               path_grouping_policy    multibus
#       }
#}

其中包含了几项参数:blacklist、defaults、multipaths、devices。这些参数对多路径的初始化信息起着决定性的作用。

    这里简单介绍下这个参数的作用,详细内容可参见官方文档:http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/DM_Multipath/#mpath_devices

 

1、blacklist

这个参数用作排除磁盘的。有些磁盘比如本地盘已经做了Raid,这里就需要将本地盘和光驱设备排除,不配置多路径。语法格式配置文件中也有,一般情况sda是作为本地磁盘:

blacklist {
        devnode "^sda"
}

当然,官方的建议还是采用WWID排除的方式,因为有些时候本地盘不只一个,名字也容易发生变化。

blacklist {
      wwid 26353900f02796769
#       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
#       devnode "^hd[a-z]"
}

WWID号可以通过multipath -ll查看,或者

/sbin/scsi_id -g -s /block/sdb

 

2、defaults

这个参数是个全局参数,如果设置了,针对所有的盘是生效的。

 

3、multipaths

这个参数是针对一个盘的,配置一个盘得相关属性

 

4、devices

这个参数是针对设备的,不同存储对应不同的vendor。有些时候存储上的盘并不能被DM识别到,需要在devices参数中加入存储相关的参数。优先级要高于multipaths,比如path_grouping_policy在multipath设置为multibus,而在devices中设置为failover,那么生效的是failover。

 

这些了解了再看一下具体的参数,虽然很多,需要改动的很少。下面是比较重要的2个参数:

path_grouping_policy  

这个参数常用的两个:multipath failover,前者做负载均衡,后者是主备方式

 

path_checker 

这个参数要根据存储类型来定。常见的几种readsector0, tur, emc_clariion, hp_sw,  directio。

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html-single/DM_Multipath/#mpath_devices




本文转自einyboy博客园博客,原文链接:http://www.cnblogs.com/einyboy/archive/2012/12/13/2817081.html,如需转载请自行联系原作者。


目录
相关文章
|
5月前
|
编解码 Shell 文件存储
Rockchip saveBaseParameter程序来设置显示器参数
Rockchip saveBaseParameter程序来设置显示器参数
329 50
paraformer支持设置 speech_noise_threshold 这个参数吗 ?
请问:speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-pytorch 这个模型支持设置 speech_noise_threshold 这个参数吗 ? vad 本身是支持的,但对这个集成的模型好像不起作用? 如果支持,应该如何正确地设置呢 ? 如果不支持,那该模型有没有什么方法可以过滤掉背景噪声? 经常会有背景噪声被识别出文字
56 0
|
芯片
Constant frequency mode(恒频模式)和Burst mode(点放模式)
Constant frequency mode是指恒频模式或者连续模式,Burst mode是指点放模式或者突发模式。这两个概念在DC-DC开关电源中比较常见,大家都了解开关电源是通过PWM信号控制开关管的通断来进行供电。恒频模式指PWM信号频率保持不变,开关电源一直在工作,这样电压比较稳定。点放模式下,开关管不是周期性开关的,当在轻负载状态下(一般是设备进入低功耗休眠模式),当电压低于预设电压时,导通一次开关管,这样就比较省电。
378 0
|
并行计算 PyTorch 算法框架/工具
torch中 x数据已经使用x.to(device), 再使用x.to(device)会报错吗?
在 PyTorch 中,如果已经将一个张量 (tensor) 移到了指定的设备上,再次调用 to 方法将不会产生任何影响,也不会报错。这是因为 to 方法内部会检查当前张量所在的设备和目标设备是否一致,如果一致,则直接返回原始张量。 以下是一个简单的示例代码,演示了当我们尝试将已经被移动到 GPU 上的张量再次移动到相同的 GPU 设备时,不会引发错误:
348 0
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
成功解决:Could not initialize SDL - No available video device (Did you set the DISPLAY variable?)
585 0
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
[Error] ‘for’ loop initial declarations are only allowed in C99 or C11 mode [Note] use option -std=c99,-std=gnu99,-std=c11 or-std=gnu11 to compile your code
1397 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode 解决方法
|
流计算
四十四、nimbus,supervisor进程自动停止(Read a frame size of ..., which is bigger than the maximum allowable...)
四十四、nimbus,supervisor进程自动停止(Read a frame size of ..., which is bigger than the maximum allowable...)
四十四、nimbus,supervisor进程自动停止(Read a frame size of ..., which is bigger than the maximum allowable...)
|
TensorFlow 算法框架/工具 异构计算
成功解决 gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce 94
成功解决 gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce 94