CLQ1013 发表于 2009-03-20 16:47

linux下,san存储多路径软件的配置

linux下,san存储多路径软件的配置

1、使用 ntsysv 命令
将mulitipath服务开启

[*] multipathd

2、启动该服务

# service multipathd start
Starting multipathd daemon:

3、修改配置文件/etc/multipath.conf

vi /etc/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 {

4、使用multipath -F 删除现有路径

5、multipath -v2 格式化路径

6、使用 multipath -ll 查看多路径

# multipath -ll
mpath0 (3600508b40006ea6e0001a000002a0000) dm-2 HP,HSV210

\_ round-robin 0
\_ 0:0:2:1 sdc 8:32
\_ 0:0:3:1 sdd 8:48
\_ round-robin 0
\_ 0:0:0:1 sda 8:0   
\_ 0:0:1:1 sdb 8:16

7、使用fdisk -l 查看多路径的情况

# fdisk -l

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

         Device Boot      Start         End      Blocks   IdSystem
/dev/cciss/c0d0p1   *         1          13      104391   83Linux
/dev/cciss/c0d0p2            14       17844   143227507+8eLinux LVM

Disk /dev/cciss/c0d1: 733.9 GB, 733909245952 bytes
255 heads, 63 sectors/track, 89226 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

         Device Boot      Start         End      Blocks   IdSystem
/dev/cciss/c0d1p1   *         1       89226   716707813+83Linux

Disk /dev/sda: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sda doesn't contain a valid partition table

Disk /dev/sdb: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/sdc: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table

Disk /dev/sdd: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn't contain a valid partition table

Disk /dev/dm-2: 536.8 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-2 doesn't contain a valid partition table

8、格式化

mkfs -t extx/dev/dm-2

9、挂载即可使用

[ 本帖最后由 CLQ1013 于 2009-3-23 11:00 编辑 ]

无牙 发表于 2009-03-20 19:02

不错

cncqpansky 发表于 2009-03-21 00:05

学习了, 做个记号

shengchunzhong 发表于 2009-03-21 14:20

收下了。thanks

放飞蓝色梦想 发表于 2009-03-21 14:25

8 错!收藏了

deadwind 发表于 2009-03-21 18:12

谢谢lz分享

但没看出来怎么修改/etc/multipath.conf

不同品牌不同型号的存储需要修改什么呢?

ps:我之前用hp的低端存储,linux下的多路径软件其实就是hp把开源的device-mapper拿来修改成自己的
在RHEL上安装后就删除了原来的/etc/multipath.conf ,而用hp修改的/etc/multipath.conf 替代,这样hp的设备就能正确识别

CLQ1013 发表于 2009-03-23 11:00

原帖由 deadwind 于 2009-3-21 18:12 发表 http://bbs2.chinaunix.net/images/common/back.gif
谢谢lz分享

但没看出来怎么修改/etc/multipath.conf

不同品牌不同型号的存储需要修改什么呢?

ps:我之前用hp的低端存储,linux下的多路径软件其实就是hp把开源的device-mapper拿来修改成自己的
在RH ...

红色部分为修改内容

软件是linux集成的软件,不同存储设置应该都是一样的。

[ 本帖最后由 CLQ1013 于 2009-3-23 11:03 编辑 ]

deadwind 发表于 2009-03-25 18:34

嗯,谢谢lz

今天试了下,只需注释掉那句即可

realy8 发表于 2009-03-31 00:41

不错。看看

yyrex 发表于 2013-01-17 18:32

#      devnode "*" 是把这个屏蔽掉?
页: [1] 2
查看完整版本: linux下,san存储多路径软件的配置