Linux系统下存储多路径功能启用
Linux系统本身自带mpio软件,mpio软件的作用是把多路径的实际盘和虚拟盘合并成能用的物理盘,fdisk –l查看的磁盘是所有的磁盘里面包含了实际可以的物理盘和多路径的虚拟盘,mpio开启后会把所有的路径盘合并成一个新磁盘设备,这个新磁盘设备对应的存储映射过来的空间开启mpio功能需要1)[size=1] chkconfig multipathd on 把多路径服务设置为开机自动启动2)[size=1] 编辑mpio配置文件Vi /etc/multipathd.conf把此文件中的红色字体三行注释掉[root@oss03 /]# cat /etc/multipath.conf # This is abasic configuration file with some examples, for device mapper# multipath.# For acomplete list of the default configuration values, see#/usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.defaults# For a listof configuration options with descriptions, see#/usr/share/doc/device-mapper-multipath-0.4.7/multipath.conf.annotated # Blacklistall devices by default. Remove this to enable multipathing# on thedefault devices. #blacklist {# devnode "*"#} ## By default,devices with vendor = "IBM" and product = "S/390.*" are## blacklisted.To enable mulitpathing on these devies, uncomment the## followinglines.#blacklist_exceptions{# device {# vendor "IBM"# product "S/390.*"# }#} ## Use userfriendly names, instead of using WWIDs as names.defaults { user_friendly_names yes}#### Here is anexample 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 wwidline in the following blacklist section is shown as an example## of how toblacklist devices by wwid. The 2 devnodelines are the## compiled indefault blacklist. If you want to blacklist entire types## of devices,such as all scsi devices, you should use a devnode line.## However, ifyou want to blacklist specific devices, you should use## a wwidline. Since there is no guarantee that aspecific device will## not changenames on reboot (from /dev/sda to /dev/sdb for example)## devnodelines 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# }#}编辑好配置文件后需要重新启动服务器查看路径状态可以通过multipath –llmpathX (X为数字)表示mpio生成的多路径磁盘设备,对存储的操作需要对mpathX操作。呵呵,Linux下多路径就是这么简单,比Windows还简单吧。