常见查看多路径状态命令:
EMC多路径软件(PowerPath)查看多路径状态:powermt display dev=all
华为多路径(UltraPath)查看多路径状态:upadmin show vlun
日立多路径软件(HDLM)查看多路径状态:dlnkmgr view -path
RHEL自带多路径软件(Multipath)查看多路径状态:multipath -ll
EMC多路径软件(PowerPath)查看多路径状态:powermt display dev=all
RHEL6下安装PowerPath:
1 用ssh工具登录至Linux主机。
2(如有)停止Navishphere HostAgent:
#/etc/init.d/naviagent stop
3 进入PowerPath安装包所在的目录,解压缩PowerPath安装包:
rpm -ivh EMCPower.LINUX*.OL6.x86_64.rpm
启动powerpatch
/etc/init.d/PowerPath status
4 使用PowerPath注册工具注册授权许可:
# emcpreg –install
5 确认产品注册信息:
# powermt check_registration
需要重启机器识别磁盘
powermt check
powermt check dev=all
powermt version
powermt check_registration
powermt config
powermt disable hba
powermt display
powermt display paths
powermt display ports
powermt display dev=all
powermt display dev=emcpower
powermt display dev=all|grep dead
powermt display hba_mode
powermt display port_mode
powermt enable hba
powermt load
powermt manage
powermt release
powermt remove
powermt restore
powermt save
powermt set mode
powermt set policy
华为多路径(UltraPath)查看多路径状态:upadmin show vlun
rpm -qa|grep UltraPath
upadmin show path
upadmin show vlun
upadmin show vlun id=?
upadmin show upconfig
1.检查多路径是否安装。
执行rpm -qa|grep UltraPath命令查看多路径软件是否完整安装
2.查看物理路径状态。
执行upadmin show path命令查询所有或指定物理路径的工作情况,包括物理路径ID、启动器WWN、所属存储系统名称、归属控制器、目标器WWN、物理路径状态、路径检测类型、路径检测状态、端口类型等。
3.查看虚拟磁盘信息。
执行upadmin show vlun命令查询所有或指定虚拟磁盘信息,包括Vlun ID、磁盘名称、Vlun名称、Vlun WWN、Vlun状态、容量、归属/工作控制器、存储名称、存储SN、逻辑路径的ID,所属控制器,以及状态等。
4.查看逻辑路径状态。
执行upadmin show vlun id=?命令可以查询指定ID的虚拟Vlun的逻辑路径信息,包括逻辑路径的ID、scsi地址、路径状态等。
5.查看多路径配置。
执行upadmin show upconfig命令查看多路径配置。
日立多路径软件(HDLM)查看多路径状态:dlnkmgr view -path
ls /sys/class/fc_host
ls -l /sys/class/fc_host/host*
cat /sys/class/fc_host/host*/port_name
cat /sys/class/fc_host/host*/port_type
cat /sys/class/fc_host/host*/port_state
/opt/DynamicLinkManager/bin/dlnkmgr view -sys
/opt/DynamicLinkManager/bin/dlnkmgr view -path
dlmcfgmgr -r
/opt/DynamicLinkManager/bin/dlnkmgr view -path
/opt/DynamicLinkManager/bin/dlnkmgr view -drv
/opt/DynamicLinkManager/bin/dlnkmgr set -afb on
/opt/DynamicLinkManager/bin/dlnkmgr view -lu
for i in `ls /dev/sddlm*1`
do echo $i `/usr/lib/udev/scsi_id -g -u -d $i`
done
RHEL自带多路径软件(Multipath)查看多路径状态:multipath -ll
yum -y install device-mapper-multipath
cp /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf /etc/
抓取ssid
/usr/lib/udev/scsi_id --whitelisted --replace-whitespace –-device=/dev/sdf
/usr/lib/udev/scsi_id -g -u /dev/sdf
-----------------------multipath.conf examples
vim /etc/multipath.conf
defaults {
# polling_interval 10
user_friendly_names yes
find_multipaths yes
failback immediate
no_path_retry fail
}
blacklist {
devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
devnode "^(hd)[a-z]"
devnode "^(dcssblk)[0-9]*"
devnode "^(td|hd|vd)[a-z]"
devnode "^dcssblk[0-9]*"
}
blacklist_exceptions {
}
devices {
device {
# vendor "HITACHI"
product ".*"
path_grouping_policy "multibus"
path_selector "service-time 0"
}
}
multipaths {
multipath {
wwid VBOX_HARDDISK_VBfd1a377b-8756d91e
alias ASMOCR01
}
multipath {
wwid VBOX_HARDDISK_VBee133aec-469fcf8f
alias ASMOCR02
}
multipath {
wwid VBOX_HARDDISK_VB84314e02-769b3f00
alias ASMOCR03
}
multipath {
wwid VBOX_HARDDISK_VB140b3df3-1fd01055
alias ASMDATA01
}
multipath {
wwid VBOX_HARDDISK_VB12c47634-64ce70d4
alias ASMDATA02
}
multipath {
wwid VBOX_HARDDISK_VB8856156c-4697b434
alias ASMDATA03
}
multipath {
wwid VBOX_HARDDISK_VBfa94c3a9-d338f1a5
alias ASMARCH01
}
multipath {
wwid VBOX_HARDDISK_VB0c07ec82-6ceacabc
alias ASMARCH02
}
}
前面不带1ATA_时生效
sed -i 's#1ATA_VBOX_HARDDISK#VBOX_HARDDISK#g' /etc/multipath.conf
ls -l /dev/disk/by-id
rm -rf /etc/udev/rules.d/99-oracle-asmdevices.rules
vim /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VB12c47634-64ce70d4",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VB140b3df3-1fd01055",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VB84314e02-769b3f00",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VBee133aec-469fcf8f",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VBfa94c3a9-d338f1a5",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VBfd1a377b-8756d91e",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VB8856156c-4697b434",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="dm-*",ENV{DM_UUID}=="mpath-VBOX_HARDDISK_VB0c07ec82-6ceacabc",OWNER="grid",GROUP="asmadmin",MODE="0660"
------------------------------------------------------------------------CentOS7磁盘管理
# fdisk -l |grep "Disk /dev/sd*"
#racdb01,racdb02,racdb03,racdb04
/usr/lib/udev/scsi_id -g -u -d /dev/sdb
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
###RHEL5/OL5
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", NAME="oracleasm/disks/asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="SATA_VBOX_HARDDISK_VB46dec7e0-192e8000_", NAME="oracleasm/disks/asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="SATA_VBOX_HARDDISK_VBce8c63bb-ac67a172_", NAME="oracleasm/disks/asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="SATA_VBOX_HARDDISK_VB7437a3b7-95b199cd_", NAME="oracleasm/disks/asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
###RHEL6/OL6
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", NAME="oracleasm/disks/asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VB46dec7e0-192e8000_", NAME="oracleasm/disks/asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBce8c63bb-ac67a172_", NAME="oracleasm/disks/asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VB7437a3b7-95b199cd_", NAME="oracleasm/disks/asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
###RHEL7/OL7
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBd306dbe0-df3367e3_", SYMLINK+="oracleasm/disks/asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VB46dec7e0-192e8000_", SYMLINK+="oracleasm/disks/asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VBce8c63bb-ac67a172", SYMLINK+="oracleasm/disks/asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="SATA_VBOX_HARDDISK_VB7437a3b7-95b199cd_", SYMLINK+="oracleasm/disks/asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
-------------------------------------两个都有效,第一个需要fdisk磁盘
mkdir -p /dev/oracleasm/disks/
ls -l /dev/oracleasm/disks/
rm -rf /etc/udev/rules.d/99-oracle-asmdevices.rules
vim /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBfd1a377b-8756d91e", SYMLINK+="oracleasm/disks/ASMOCR01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBee133aec-469fcf8f", SYMLINK+="oracleasm/disks/ASMOCR02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB84314e02-769b3f00", SYMLINK+="oracleasm/disks/ASMOCR03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB140b3df3-1fd01055", SYMLINK+="oracleasm/disks/ASMDATA01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB12c47634-64ce70d4", SYMLINK+="oracleasm/disks/ASMDATA02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB8856156c-4697b434", SYMLINK+="oracleasm/disks/ASMDATA03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBfa94c3a9-d338f1a5", SYMLINK+="oracleasm/disks/ASMARCH01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB0c07ec82-6ceacabc", SYMLINK+="oracleasm/disks/ASMARCH02", OWNER="grid", GROUP="asmadmin", MODE="0660"
或
mkdir -p /dev/oracleasm/disks/
ls -l /dev/oracleasm/disks/
rm -rf /etc/udev/rules.d/99-oracle-asmdevices.rules
vim /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBfd1a377b-8756d91e", SYMLINK+="oracleasm/disks/ASMOCR01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBee133aec-469fcf8f", SYMLINK+="oracleasm/disks/ASMOCR02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB84314e02-769b3f00", SYMLINK+="oracleasm/disks/ASMOCR03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB140b3df3-1fd01055", SYMLINK+="oracleasm/disks/ASMDATA01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB12c47634-64ce70d4", SYMLINK+="oracleasm/disks/ASMDATA02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB8856156c-4697b434", SYMLINK+="oracleasm/disks/ASMDATA03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBfa94c3a9-d338f1a5", SYMLINK+="oracleasm/disks/ASMARCH01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?", SUBSYSTEM=="block", PROGRAM=="/lib/udev/scsi_id -gud /dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB0c07ec82-6ceacabc", SYMLINK+="oracleasm/disks/ASMARCH02", OWNER="grid", GROUP="asmadmin", MODE="0660"
reboot
/usr/lib/udev/scsi_id
ls -al /dev/oracleasm/disks/ASM*
###KERNEL=="dm-*",ENV{DM_UUID}=="mpath-360060e80087849000050784900000100",OWNER="oracle",GROUP="asmadmin",MODE="0660"
###KERNEL=="sddlm*", SUBSYSTEM=="block", ENV{ID_SERIAL}=="360060e80087849000050784900006000", SYMLINK+="ASMOCR01", OWNER="oracle", GROUP="asmadmin", MODE="0660"
wwid: /usr/lib/udev/scsi_id -gud /dev/sdb
uuid: /usr/sbin/blkid|grep /dev/sdb
blkid|grep UUID
lsblk
ls -l /dev/disk/by-id
最新评论
这个牛
放下欲望,男人从来不醉,充分且必要
勇气、责任、自信、创新,为天下先!
软件即数据,软件即服务,软件即管理,软件就是对人类各种社会活动的仿真和记录。软件很重要,但软件不可能凌驾于业务之上,尤其不可能高人一等。