【精选】CentOS 系统光纤连接存储的多路径配置及使用方法

上传人:豆浆 文档编号:891050 上传时间:2017-05-20 格式:DOC 页数:6 大小:145.50KB
返回 下载 相关 举报
【精选】CentOS 系统光纤连接存储的多路径配置及使用方法_第1页
第1页 / 共6页
【精选】CentOS 系统光纤连接存储的多路径配置及使用方法_第2页
第2页 / 共6页
【精选】CentOS 系统光纤连接存储的多路径配置及使用方法_第3页
第3页 / 共6页
【精选】CentOS 系统光纤连接存储的多路径配置及使用方法_第4页
第4页 / 共6页
【精选】CentOS 系统光纤连接存储的多路径配置及使用方法_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《【精选】CentOS 系统光纤连接存储的多路径配置及使用方法》由会员分享,可在线阅读,更多相关《【精选】CentOS 系统光纤连接存储的多路径配置及使用方法(6页珍藏版)》请在金锄头文库上搜索。

1、CentOS 系统光纤连接存储的多路径配置及使用方法1、安装多路径软件包:device-mapper-1.02.67-2.el5device-mapper-event-1.02.67.2.el5device-mapper-multipath-0.4.7-48.el52、检查安装包的安装情况#rpm aq |grep multipath3、安装上述多路径软件包# rpm -ivh device-mapper-1.02.67-2.el5.x86_64.rpm# rpm -ivh device-mapper-event-1.02.67-2.el5.x86_64.rpm# rpm -ivh devic

2、e-mapper-multipath-0.4.7-48.el5.x86_64.rpm安装过程中可能会提示需要安装其他的关联软件包:主要与多路径软件相关联的软件包如下:libaio-0.3.107-10.e16.i686.rpmlibaio-0.3.107-10.e16.x86_64.rpmlibaio-devel-0.3.107-10.e16.i686.rpmlibaio-devel-0.3.107-10.e16.x86_64.rpm如服务器可以连接公网的话,可直接用 yum 来安装,yum 会自动将相关联的软件安装上 .#yum install y device-mapper*检查安装情况#

3、rpm aq|grep multipath安装完成后需重启机器.4、配置多路径软件 multipath4.1 、将多路径软件添加至内核模块中#modprobe dm-multipath#modprobe dm-round-robin检查内核添加情况#lsmod |grep multipath4.2、将多路径软件 multipath 设置为开机自启动#chkconfig -level 2345 multipathd on检查#chkconfig -list|grep multipathd启动 multipath 服务#service multipathd restart4.3、配置 multip

4、ath 软件, 编辑/etc/multipath.conf注意:默认情况下, /etc/multipath.conf 是不存在的,需要做如下准备工作:4.3.1 、 cd 至/sbin 下, 用如下命令生成 multipath.conf 文件 :#mpathconf -enable -find_multipaths y -with_module y -with_chkconfig y4.3.2、查看并获取存储分配给服务器的逻辑盘 lun 的 wwid 信息#more /etc/multipath/wwids编辑/etc/multipath.conf,编辑 multipath 的配置文件时, 可

5、将自动生成的 multipath.conf 保留,重新 vim 个新的multipath 文件.#vim /etc/multipath.confrootahltimt3 # vim /etc/multipath.confdefaults find_multipaths yesuser_friendly_names noblacklist #-黑名单项 :即不使用多路径的硬盘,如服务器本地盘等wwid 3600508b1001c5ae72efe1fea025cd2e5 #-不使用多路径的本地盘 wwid 号devnode hda-z #-不使用多路径的本地盘 hd 名称multipaths #-

6、使用多路径软件项multipath #-单块存储盘配置,如有多块存储盘,如多个 multipath配置wwid 360050763008181d6d000000000000021 #-使用多路径的存储盘 wwid 号alias IBMStorage001 #该存储盘多路径后的别名path_grouping_policy multibuspath_selector round-robin 0failback manualrr_weight priorities no_path_retry 5multipath wwid 360050763008181d6d000000000000022alias

7、 IBMStorage002path_grouping_policy multibuspath_selector round-robin 0failback manualrr_weight prioritiesno_path_retry 5devices device vendor IBM #-存储厂家名称product V5000 #-存储产品型号path_grouping_policy multibusgetuid_callout /lib/udev/scsi_id -whitelisted -device=/dev/%npath_checker readsector0path_selec

8、tor round-robin 0hardware_handler 0failback 15rr_weight prioritiesno_path_retry queue保存文件后退出.4.4、启动 multipath 配置#multipath v2由上图可看出,名称为 IBMStorage015 的逻辑盘的 wwid 号为 360050763008181d6d000000000000001,产品型号为 IBM2145,该逻辑盘大小为 200G,共 4 条链路,每条链路的状态均为 running 的,即 4 条链路均正常.(图中环境为存储双控制器-双 SAN-服务器双 HBA 卡,当存储划分一

9、个 lun 逻辑盘给服务器后,服务器因为一个 lun逻辑盘多条链路的原因会在系统中生成 4 块相同的 wwid 号的逻辑盘,这样就给系统的使用带来不便,故需要引入多路径软件.当然多路径软件最主要是为了安全,即 4 条链路中的某一条两条三条出现故障的情况 ,仍然不影响系统的使用)查看、检查多路径情况# multipath -l|more启用 multipath 配置后,会在/dev/mapper 下生成多路径逻辑盘#cd /dev/mapper#ll至此, 多路径 multipath 配置完成5、 LVM 使用和管理多路径逻辑盘5.1、 fdisk 磁盘分区由上述图中环境可知,单块逻辑盘大小为

10、200G,若需要使用小于 200G 时,需要将这 200G 进行 fdisk 分区,即上图中的 p1(分成多块时, 会有 p2、 p3)#fdisk /dev/mapper/IBMStorage004rootahltimt3 mapper# fdisk /dev/mapper/IBMStorage004Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel with disk identifier 0xe24e10c0.Chang

11、es will remain in memory only, until you decide to write them.After that, of course, the previous content wont be recoverable.Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)WARNING: DOS-compatible mode is deprecated. Its strongly recommended toswitch off the mode (comm

12、and c) and change display units tosectors (command u).Command (m for help): n #-新建分区Command actione extendedp primary partition (1-4)p #-分区类型为主分区Partition number (1-4): 1 #-分区号即 p?号First cylinder (1-26108, default 1): 1 #-分区在逻辑盘的开始块号Last cylinder, +cylinders or +sizeK,M,G (1-26108, default 26108): 26108 #-分区在逻辑盘的结束块号Command (m for help): t #-编辑分区类型Selected partition 1Hex code (type L to list codes): 8e #-8e 为 linux 使用的逻辑卷类型( 查看所有类型可 L 查看)Changed system type of partition 1 to 8e (Linux LVM)Command (m for help): p #-查看刚刚分区的类型信息Disk /dev/mapper/IBMStorage004: 214.7 GB,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号