User:Administrator
Last Update:2020-7-26 12:17
### Code Reference
-
URL:https://blog.csdn.net/shayuwei/article/details/90481922
-
DESC:创建ASM磁盘的两种方式:asmlib,udev(RHEL 7.6)|oracle 创建asm磁盘
-
Last Update:2020-7-26 12:17
-
Time:2020-7-26 12:17 Tittle:创建ASM磁盘的两种方式:asmlib,udev(RHEL 7.6)|oracle 创建asm磁盘
-
Version:001
-
创建ASM磁盘的两种方式:asmlib,udev(RHEL 7.6)|oracle 创建asm磁盘
-
asmlib(需要安装三个包,安装过程略官网下载驱动包)
-
初始化
oracleasm configure -ioracleasm configure -doracleasm configure -eoracleasm status #查看oracleasm状态oracleasm exit #退出oracleasm oracleasm init #加载oracleasm内核模块(重新启动)
-
增加
oracleasm createdisk ocr /dev/asm-diskxoracleasm createdisk fra /dev/asm-diskxoracleasm createdisk data04 /dev/asm-diskhoracleasm createdisk data05 /dev/asm-diskj
-
删除
oracleasm deletedisk data
-
修改(清理文件头)
处理Device “/dev/eql/t10ocr” is already labeled for ASM disk ""问题dd if=/dev/zero of=/dev/eql/t10ocr bs=1024 count=100
-
查看
oracleasm listdisksll /dev/oracleasm/disks/
-
-
udev
- 1.4.18 节点1和节点2修改共享存储(19c存储空间要大于56G,否则后续安装会报错,磁盘AU大小需要一致)
节点1和节点2,固定设备名称并且赋予grid属性,执行如下命令,用来生成udev规则.
1 绑定共享的磁盘为asm盘for i in b c d e f g ;doecho "KERNEL==\"sd*\", SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d \$devnode\",RESULT==\"`/usr/lib/udev/scsi_id -g -u -d /dev/sd$i`\",SYMLINK+=\"asm-disk$i\", NAME=\"asm-disk$i\",OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\"" >> /etc/udev/rules.d/99-oracle-asmdevices.rulesdone2 查看生成的rules文件cat /etc/udev/rules.d/99-oracle-asmdevices.rules [root@rede home]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c299b9f425d42fc075120dca1799",SYMLINK+="asm-diskb", NAME="asm-diskb",OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c290a496e6932e5b13dacd068f29",SYMLINK+="asm-diskc", NAME="asm-diskc",OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c29a239f1aea58b526b584115e58",SYMLINK+="asm-diskd", NAME="asm-diskd",OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c29b84ed2d240536c2424a5eff57",SYMLINK+="asm-diske", NAME="asm-diske",OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c295630481043234eef5e12f5d78",SYMLINK+="asm-diskf", NAME="asm-diskf",OWNER="grid", GROUP="asmadmin", MODE="0660"KERNEL=="sd*", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c2901e975b9293bca5574fe0ba47",SYMLINK+="asm-diskg", NAME="asm-diskg",OWNER="grid", GROUP="asmadmin", MODE="0660"3 重新加载udev&查看asm磁盘(从机主机均操作)udevadm control --reload-rulesudevadm trigger ll /dev/asm*
- 1.4.18.1 节点2拷贝节点1的udev规则文件(替换节点2的规则文件)
scp node1:/etc/udev/rules.d/99-oracle-asmdevices.rules /etc/udev/rules.d/99-oracle-asmdevices.rules
- 1.4.18 节点1和节点2修改共享存储(19c存储空间要大于56G,否则后续安装会报错,磁盘AU大小需要一致)
-
-
参考
-