centos安装multipath正确识别、使用存储(最基本的步骤)
非普通硬盘如存储阵列,挂到服务器上以后,会看到很多容量一模一样的硬盘,比如/dev/sdb sdc sdd sde,这种的要想正常使用,需要装上multipath服务。
一、装包。
yum install -y device-mapper-persistent-data device-mapper-multipath device-mapper-libs device-mapper-event-libs device-mapper-multipath-libs device-mapper device-mapper-event
二、设置服务开机启动。
chkconfig multipathd on
三、加载模块。
modprobe dm_multipath
modprobe dm_round_robin
四、自动生成配置文件。
mpathconf –enable –find_multipaths y –with_module y –with_chkconfig y
五、启动服务。
(/etc/init.d/multipathd status看看服务状态,刚装的肯定没启)
/etc/init.d/multipathd start
六、启动服务后可查看存储分配给本服务器的逻辑盘lun的wwid信息
more /etc/multipath/wwids
fdisk -l后可以看到这样的/dev/mapper/mpathb设备,就可以把他当成普通磁盘来操作了。