[2021-01-05]RAC 安装19.1OGG之配置ACFS
因为要安装RAC的ogg,这里先安装ACFSRAC版本为19cOGG版本为18c平台为VMware操作系统为 Red Hat Enterprise Linux Server release 7.21、首先创建共享盘2、分别添加到RAC的两个节点中打开vmware虚拟机的vmx文件,如下(RAC的两个节点都要执行):添加如下几行3、使用udev绑定查看新添加的磁盘--//使用udev绑定,命令如下:
因为要安装RAC的ogg,这里先安装ACFS
RAC版本为19c
OGG版本为19.1
平台为VMware
操作系统为 Red Hat Enterprise Linux Server release 7.2
1、首先创建共享盘
2、分别添加到RAC的两个节点中
打开vmware虚拟机的vmx文件,如下(RAC的两个节点都要执行):
添加如下几行
3、使用udev绑定
查看新添加的磁盘
--//使用udev绑定,命令如下:
for i in e;
do
echo "KERNEL==\"sd*\",ENV{DEVTYPE}==\"disk\",SUBSYSTEM==\"block\",PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d \$devnode\",RESULT==\"`/usr/lib/udev/scsi_id -g -u /dev/sd$i`\", RUN+=\"/bin/sh -c 'mknod /dev/asmdisk$i b \$major \$minor; chown grid:asmadmin /dev/asmdisk$i; chmod 0660 /dev/asmdisk$i'\""
done
绑定前记录/etc/udev/rules.d/99-oracle-asmdevices.rules 文件内容
[root@dm01 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c29646b3175cadf174105bf96e66", RUN+="/bin/sh -c 'mknod /dev/asmdiskb b $major $minor; chown grid:asmadmin /dev/asmdiskb; chmod 0660 /dev/asmdiskb'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c293fd50d60d996a53338f6815a2", RUN+="/bin/sh -c 'mknod /dev/asmdiskc b $major $minor; chown grid:asmadmin /dev/asmdiskc; chmod 0660 /dev/asmdiskc'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c299f93b7eeabbbcf10d45aca528", RUN+="/bin/sh -c 'mknod /dev/asmdiskd b $major $minor; chown grid:asmadmin /dev/asmdiskd; chmod 0660 /dev/asmdiskd'"
[root@dm01 ~]#
绑定(RAC的两个节点都要执行),把得到记录追加到/etc/udev/rules.d/99-oracle-asmdevices.rules
[root@dm01 ~]# for i in e;
> do
> echo "KERNEL==\"sd*\",ENV{DEVTYPE}==\"disk\",SUBSYSTEM==\"block\",PROGRAM==\"/usr/lib/udev/scsi_id -g -u -d \$devnode\",RESULT==\"`/usr/lib/udev/scsi_id -g -u /dev/sd$i`\", RUN+=\"/bin/sh -c 'mknod /dev/asmdisk$i b \$major \$minor; chown grid:asmadmin /dev/asmdisk$i; chmod 0660 /dev/asmdisk$i'\""
> done
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c2902e3b82180d7f85215bddab06", RUN+="/bin/sh -c 'mknod /dev/asmdiske b $major $minor; chown grid:asmadmin /dev/asmdiske; chmod 0660 /dev/asmdiske'"
[root@dm01 ~]#
绑定后查看
[root@dm01 ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c29646b3175cadf174105bf96e66", RUN+="/bin/sh -c 'mknod /dev/asmdiskb b $major $minor; chown grid:asmadmin /dev/asmdiskb; chmod 0660 /dev/asmdiskb'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c293fd50d60d996a53338f6815a2", RUN+="/bin/sh -c 'mknod /dev/asmdiskc b $major $minor; chown grid:asmadmin /dev/asmdiskc; chmod 0660 /dev/asmdiskc'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c299f93b7eeabbbcf10d45aca528", RUN+="/bin/sh -c 'mknod /dev/asmdiskd b $major $minor; chown grid:asmadmin /dev/asmdiskd; chmod 0660 /dev/asmdiskd'"
KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="36000c2902e3b82180d7f85215bddab06", RUN+="/bin/sh -c 'mknod /dev/asmdiske b $major $minor; chown grid:asmadmin /dev/asmdiske; chmod 0660 /dev/asmdiske'"
[root@dm01 ~]#
但是发现并没有生成期望的asmdiske
[root@dm01 dev]# cd /dev/
[root@dm01 dev]# ls -ltr asm*
brw-rw---- 1 grid asmadmin 8, 48 Jan 5 15:00 asmdiskd
brw-rw---- 1 grid asmadmin 8, 16 Jan 5 15:48 asmdiskb
brw-rw---- 1 grid asmadmin 8, 32 Jan 5 15:48 asmdiskc
asm:
total 0
[root@dm01 dev]#
重新加载udev
[root@dm01 dev]# /sbin/udevadm trigger --type=devices --action=change
[root@dm01 dev]# /sbin/udevadm control --reload
[root@dm01 dev]# ls -ltr asm*
brw-rw---- 1 grid asmadmin 8, 48 Jan 5 15:00 asmdiskd
brw-rw---- 1 grid asmadmin 8, 32 Jan 5 15:50 asmdiskc
brw-rw---- 1 grid asmadmin 8, 16 Jan 5 15:50 asmdiskb
asm:
total 0
[root@dm01 dev]#
还是看不到,重启节点之后还是不行,最后决定手动创建了(RAC的2个节点都执行)
[root@dm01 dev]# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 2 Jan 5 15:55 /dev/sda2
brw-rw---- 1 root disk 8, 1 Jan 5 15:55 /dev/sda1
brw-rw---- 1 root disk 8, 0 Jan 5 15:55 /dev/sda
brw-rw---- 1 root disk 8, 16 Jan 5 15:55 /dev/sdb
brw-rw---- 1 root disk 8, 64 Jan 5 15:55 /dev/sde
brw-rw---- 1 root disk 8, 48 Jan 5 15:55 /dev/sdd
brw-rw---- 1 root disk 8, 32 Jan 5 15:55 /dev/sdc
[root@dm01 dev]# mknod /dev/asmdiske b 8 64
[root@dm01 dev]# ls -ltr asm*
brw-rw---- 1 grid asmadmin 8, 48 Jan 5 15:51 asmdiskd
brw-r--r-- 1 root root 8, 64 Jan 5 15:58 asmdiske
brw-rw---- 1 grid asmadmin 8, 32 Jan 5 15:58 asmdiskc
brw-rw---- 1 grid asmadmin 8, 16 Jan 5 15:58 asmdiskb
asm:
total 0
[root@dm01 dev]# chown grid:asmadmin /dev/asmdiske
[root@dm01 dev]# chmod 0660 /dev/asmdiske
[root@dm01 dev]# ls -ltr asm*
brw-rw---- 1 grid asmadmin 8, 48 Jan 5 15:51 asmdiskd
brw-rw---- 1 grid asmadmin 8, 64 Jan 5 15:58 asmdiske
brw-rw---- 1 grid asmadmin 8, 32 Jan 5 15:58 asmdiskc
brw-rw---- 1 grid asmadmin 8, 16 Jan 5 15:58 asmdiskb
asm:
total 0
[root@dm01 dev]#
4、使用asmca创建磁盘组
首先要创建ASM磁盘组,然后在此基础上创建ASM卷,最后才能创建ACFS
首先创建磁盘组
4.1)选中Disk Groups,点击左下角的create
4.2)选项External,磁盘组名字为OGG,选择刚创建的/dev/asmdiske磁盘
4.3)点击OK,开始创建磁盘组
4.4)OGG磁盘组创建成功
4.5)使用crsctl命令检查crsctl stat res -t
5、使用asmca创建acfs
5.1)grid用户调用asmca(RAC的任意一个节点)
5.2) 选中Volumes
5.3) 输入volume名字,选择磁盘组OGG,大小给4G,点击OK
5.4)volumes创建成功
5.5)创建ACFS,选中ACFS File Systems,点击create
5.6) 两节点首先创建好/ogg目录,然后勾选自动运行配置命令,点击OK
[root@dm01 dev]# mkdir -p /ogg
[root@dm01 dev]# chown -R oracle:oinstall /ogg
遇到DBT-30145 You need to enter the root credentials in 'Settings' for ASMCA
把自动运行勾选去掉,先show command显示如下:
5.7)运行acfs_script.sh脚本
[grid@dm02 ~]$ /u01/app/grid/cfgtoollogs/asmca/scripts/acfs_script.sh
PRCN-2018 : Current user grid is not a privileged user
[grid@dm02 ~]$ su - root
Password:
Last login: Tue Jan 5 16:23:06 CST 2021 on pts/1
[root@dm02 ~]# /u01/app/grid/cfgtoollogs/asmca/scripts/acfs_script.sh
ACFS file system /ogg is mounted on nodes dm01,dm02
[root@dm02 ~]#
5.8)查看acfs文件系统是否能够正常显示
节点1
[root@dm01 dev]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rhel-root 73364480 52885196 20479284 73% /
devtmpfs 1723752 0 1723752 0% /dev
tmpfs 1739424 1127488 611936 65% /dev/shm
tmpfs 1739424 9556 1729868 1% /run
tmpfs 1739424 0 1739424 0% /sys/fs/cgroup
/dev/sda1 201388 129364 72024 65% /boot
tmpfs 347888 16 347872 1% /run/user/42
tmpfs 347888 0 347888 0% /run/user/0
/dev/asm/ogg_lv-356 4194304 570312 3623992 14% /ogg
[root@dm01 dev]#
节点2
[root@dm02 dev]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rhel-root 73364480 58461216 14903264 80% /
devtmpfs 1723748 0 1723748 0% /dev
tmpfs 1739424 1127500 611924 65% /dev/shm
tmpfs 1739424 9596 1729828 1% /run
tmpfs 1739424 0 1739424 0% /sys/fs/cgroup
/dev/sda1 201388 129364 72024 65% /boot
tmpfs 347888 0 347888 0% /run/user/0
tmpfs 347888 12 347876 1% /run/user/54322
/dev/asm/ogg_lv-356 4194304 570312 3623992 14% /ogg
[root@dm02 dev]#
更多推荐
所有评论(0)