centos 6.7 识别IBM v3700 存储
centos 6.7 识别IBM v3700 存储
配置IBM V3700存储
创建池
创建卷
添加主机(本公司采用光纤)
映射卷到主机
操作系统层操作
linux 识别存储空间必须重启
一、确保安装以下的包:
rpm -qa "*device*" device-mapper-event-libs-1.02.74-10.el6.x86_64 device-mapper-1.02.74-10.el6.x86_64 device-mapper-event-1.02.74-10.el6.x86_64 device-mapper-libs-1.02.74-10.el6.x86_64 device-mapper-multipath-0.4.9-56.el6.x86_64 device-mapper-multipath-libs-0.4.9-56.el6.x86_64
二、编辑配置文件/etc/multipath.conf
要创建一个multipath.conf的配置文件,该文件在安装后不会自动创建。可以使用一个模板创建一个multipath.conf的文件。
vim /etc/multipath.conf # multipath.conf written by anaconda defaults { user_friendly_names yes } blacklist { devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*" devnode "sdc" } multipaths { multipath { wwid 3600605b00befce701fdd673206f8774a alias IBMStorage001 path_grouping_policy multibus path_selector "round-robin 0" failback manual rr_weight priorities no_path_retry 5 } }
三、加载并启动multipath模块和服务
# modprobe dm_multipath # lsmod |grep dm_multipath dm_multipath 17649 5 dm_round_robin dm_mod 81692 41 dm_multipath,dm_mirror,dm_log # service multipathd restart 或 /etc/init.d/multipathd restart # chkconfig --level 345 multipathd on # chkconfig --list | grep multipathd multipathd 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭 # multipath -v3 // 装配多路径设备
四、检查multipath聚合后的设备名,以及设备对应的链路情况。
# multipath -ll //显示当前多路径拓扑结构 Mar 17 11:37:06 | multipath.conf line 51, duplicate keyword: blacklist Mar 17 11:37:06 | multipath.conf line 55, duplicate keyword: multipaths mpathd (36005076300820fac1800000000000000) dm-11 IBM,2145 size=1.8T features='1 queue_if_no_path' hwhandler='0' wp=rw |-+- policy='round-robin 0' prio=50 status=active | |- 5:0:1:0 sdf 8:80 active ready running | `- 6:0:1:0 sdk 8:160 active ready running `-+- policy='round-robin 0' prio=10 status=enabled |- 5:0:0:0 sde 8:64 active ready running `- 6:0:0:0 sdj 8:144 active ready running
以上的结果可以看出,每个磁盘设备对应的是4条链路。每个设备都有两个multipath设备名,分别是mpath[x]和dm-[x],mpath位于/dev/mpath目录下,dm-[x]位于/dev目录下。
# cd /dev && ls dm* dm-11 dm-12
# cd /dev/mapper/ && ll lrwxrwxrwx. 1 root root 8 3月 15 21:08 mpathd -> ../dm-11 lrwxrwxrwx. 1 root root 8 3月 15 21:19 mpathdp1 -> ../dm-12
五、用fdisk -l命令也可以看到多路径软件创建的磁盘,multipath磁盘的基本操作,格式化分区
# fdisk -l ---------------------------------------------------------------------------------- /dev/mapper/mpathdp1 1 267350 2147483647+ ee GPT ---------------------------------------------------------------------------------- # pvcreate /dev/mapper/mpathb # parted /dev/mapper/mpathb ------------------------------------------------------------------------------------ GNU Parted 2.1 Using /dev/mapper/mpathdp1 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mklabel gpt #设置分区类型为gpt (parted) mkpart extended 0% 100% #扩展分区,并使用整个硬盘 (parted) quit #退出 Information: You may need to update /etc/fstab. ------------------------------------------------------------------------------------------- # mkfs.ext4 /dev/mapper/mpathdp1 # mount /dev/mapper/mpathdp1 /pqsoft6 # vi /etc/fstab /dev/mapper/mpathdp1 /pqsoft6 ext4 defaults 1 2
六、路径切换测试
# cd /pqsoft6 # mkdir test # cd test # touch 123.txt # echo "test " > 123.txt # cat 123.txt ------------------------------------ test