Centos 5 多路径配置步骤

Centos 5 多路径配置步骤

1、检查系统中是否已安装multipath:
    在CentOS 5中,一般情况下安装系统时multipath已经被安装,查看multipath是否安装如下:
[root@localhost vol]#  rpm  -qa  | grep  mapper
device-mapper-multipath-0.4.7-34.el5
device-mapper-1.02.39-1.el5
device-mapper-1.02.39-1.el5
device-mapper-event-1.02.39-1.el5
[root@localhost vol]#

如果没有安装,那么要安装下列rpm包(注意使用对应系统内核的rpm包):
# rpm  -ivh  device-mapper-1.02.32-1.el5.i386.rpm
# rpm  -ivh  device-mapper-1.02.32-1.el5.x86_64.rpm
# rpm  -ivh  device-mapper-event-1.02.32-1.el5.x86_64.rpm
# rpm  -ivh  device-mapper-multipath-0.4.7-30.el5.x86_64.rpm

2、设置成开机自启动multipathd:

[root@localhost vol]# chkconfig  --list  | grep  multipath
multipathd      0:关闭  1:关闭  2:关闭  3:关闭  4:关闭  5:关闭  6:关闭
[root@localhost vol]# chkconfig  --level  2345  multipathd on
[root@localhost vol]# chkconfig  --list  | grep  multipathd
multipathd      0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭
[root@localhost vol]#

3、启动multipathd服务:

[root@localhost vol]# service  multipathd  status
multipathd 已停
[root@localhost vol]# service  multipathd  start
正在启动守护进程multipathd:[确定]
[root@localhost vol]# lsmod  | grep  dm_multipath
dm_multipath           56921  0
scsi_dh                42177  1 dm_multipath
dm_mod                101649  4 dm_mirror,dm_multipath,dm_raid45,dm_log
[root@localhost vol]#  service  multipathd  status
multipathd (pid  9035) 正在运行...
[root@localhost vol]#

4、对multipath进行配置:
multipath的配置文件是/etc/multipath.conf
我们要对/dev/sdb 和 /dev/sdd 设置多路径,使用下面的命令检查:

[root@localhost mpath]# fdisk  -l

Disk /dev/sda: 299.4 GB, 299439751168 bytes
255 heads, 63 sectors/track, 36404 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      102400   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        6375    51096576   82  Linux swap / Solaris
/dev/sda3            6375       36405   241219584   83  Linux

Disk /dev/sdb: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sdc (Sun disk label): 255 heads, 189 sectors, 47507 cylinders
Units = cylinders of 48195 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sdc3  u          0     47507 1144799932+   5  Whole disk
/dev/sdc7             0     47507 1144799932+   4  SunOS usr

Disk /dev/sdc3 (Sun disk label): 255 heads, 189 sectors, 47507 cylinders
Units = cylinders of 48195 * 512 bytes

    Device Flag    Start       End    Blocks   Id  System
/dev/sdc3p3  u          0     47507 1144799932+   5  Whole disk
/dev/sdc3p7             0     47507 1144799932+   4  SunOS usr

Disk /dev/sdc7 (Sun disk label): 255 heads, 189 sectors, 47507 cylinders
Units = cylinders of 48195 * 512 bytes

    Device Flag    Start       End    Blocks   Id  System
/dev/sdc7p3  u          0     47507 1144799932+   5  Whole disk
/dev/sdc7p7             0     47507 1144799932+   4  SunOS usr

Disk /dev/sdd: 1099.5 GB, 1099511627776 bytes
255 heads, 63 sectors/track, 133674 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Disk /dev/sde (Sun disk label): 64 heads, 64 sectors, 8 cylinders
Units = cylinders of 4096 * 512 bytes

   Device Flag    Start       End    Blocks   Id  System
/dev/sde3  u          0         8     16384    5  Whole disk
/dev/sde7             0         8     16384    4  SunOS usr

Disk /dev/sde3 (Sun disk label): 64 heads,
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值