关于Linux中shell 等知识的一些笔记(关于Linux中卸载分区,下面描述正确的是)
1634
2022-05-29
操作系统版本信息:
CentOS Linux release 7.8.2003 (Core)
01,多路径软件安装
#软件安装 yum install device-mapper-multipath -y #开机自动启动 systemctl enable multipathd.service #加载模块 lsmod |grep multipath modprobe dm-multipath modprobe dm-round-robin lsmod |grep multipath 正常模块加载信息: [root@hecs-66a2 ~]# lsmod |grep multipath dm_multipath 27792 4 dm_round_robin,dm_service_time dm_mod 124501 3 dm_multipath
03,软件配置
#生成默认配置文件 /sbin/mpathconf --enable 修改默认参数 sed -i 's/find_multipaths/#find_multipaths/' /etc/multipath.conf #参数说明 #find_multipaths如置为yes,则将为3种场景创建多路径设备(不在黑名单的两个路径的wwid相同;用户手动强制创建;一个路径的wwid与之前已经创建的多路径设备相同) #user_friendly_names:如为yes,则用/etc/multipath/bindings中的设置命名;
04,启动多路径软件
#加载路径配置文件 multipath -r #查看聚合路径信息 multipath -ll #启动多路径软件 systemctl enable multipathd.service systemctl restart multipathd.service
05,查看聚合磁盘信息
[root@hecs-66a2 multipath]# multipath -ll mpathb (36001405a8111ea8e7e54c8fb25613092) dm-1 LIO-ORG ,disk02 size=20G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active `- 2:0:0:1 sdb 8:16 active ready running mpatha (360014054170ebd76f8b4cd69600e1ba9) dm-0 LIO-ORG ,disk01 size=10G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active `- 2:0:0:0 sda 8:0 active ready running [root@hecs-66a2 multipath]# pwd /etc/multipath [root@hecs-66a2 multipath]# cat bindings # Multipath bindings, Version : 1.0 # NOTE: this file is automatically maintained by the multipath program. # You should not need to edit this file in normal circumstances. # # Format: # alias wwid # mpatha 360014054170ebd76f8b4cd69600e1ba9 mpathb 36001405a8111ea8e7e54c8fb25613092 [root@hecs-66a2 multipath]# cat bindings wwids [root@hecs-66a2 multipath]# cat wwids # Multipath wwids, Version : 1.0 # NOTE: This file is automatically maintained by multipath and multipathd. # You should not need to edit this file in normal circumstances. # # Valid WWIDs: /360014054170ebd76f8b4cd69600e1ba9/ /36001405a8111ea8e7e54c8fb25613092/ [root@hecs-66a2 multipath]#
06,常用命令参考
#常用命令参考: /usr/lib/udev/scsi_id -g -u /dev/sda(手动检查wwid) multipath -r (修改multipath.conf配置文件之后重新加载) multipath -ll (查看多路径状态) multipath -v2 (格式化路径,检测路径,合并路径) multipath -v3 (查看多路径详情blacklist、whitelist和设备wwid) multipath -F (删除现有链路)
Linux
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。