免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 17727 | 回复: 12
打印 上一主题 下一主题

[RAID与磁盘阵列] linux下,san存储多路径软件的配置 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-03-20 16:47 |只看该作者 |倒序浏览
linux下,san存储多路径软件的配置

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

    2、启动该服务

    [root@mail init.d]# 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 查看多路径

    [root@mail /]# multipath -ll
    mpath0 (3600508b40006ea6e0001a000002a0000) dm-2 HP,HSV210
    [size=500G][features=1 queue_if_no_path][hwhandler=0]
    \_ round-robin 0 [prio=100][active]
    \_ 0:0:2:1 sdc 8:32  [active][ready]
    \_ 0:0:3:1 sdd 8:48  [active][ready]
    \_ round-robin 0 [prio=20][enabled]
    \_ 0:0:0:1 sda 8:0   [active][ready]
    \_ 0:0:1:1 sdb 8:16  [active][ready]

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

    [root@mail /]# 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   Id  System
    /dev/cciss/c0d0p1   *           1          13      104391   83  Linux
    /dev/cciss/c0d0p2              14       17844   143227507+  8e  Linux 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   Id  System
    /dev/cciss/c0d1p1   *           1       89226   716707813+  83  Linux

    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 编辑 ]
  • 论坛徽章:
    1
    CU十二周年纪念徽章
日期:2013-10-24 15:41:34
    2 [报告]
    发表于 2009-03-20 19:02 |只看该作者
    不错

    论坛徽章:
    0
    3 [报告]
    发表于 2009-03-21 00:05 |只看该作者
    学习了, 做个记号

    论坛徽章:
    0
    4 [报告]
    发表于 2009-03-21 14:20 |只看该作者
    收下了。thanks

    论坛徽章:
    0
    5 [报告]
    发表于 2009-03-21 14:25 |只看该作者
    8 错!收藏了

    论坛徽章:
    0
    6 [报告]
    发表于 2009-03-21 18:12 |只看该作者
    谢谢lz分享

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

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

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

    论坛徽章:
    0
    7 [报告]
    发表于 2009-03-23 11:00 |只看该作者
    原帖由 deadwind 于 2009-3-21 18:12 发表
    谢谢lz分享

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

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

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


    红色部分为修改内容

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

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

    论坛徽章:
    0
    8 [报告]
    发表于 2009-03-25 18:34 |只看该作者
    嗯,谢谢lz

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

    论坛徽章:
    0
    9 [报告]
    发表于 2009-03-31 00:41 |只看该作者
    不错。看看

    论坛徽章:
    0
    10 [报告]
    发表于 2013-01-17 18:32 |只看该作者
    #        devnode "*" 是把这个屏蔽掉?
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP