oracle 19.9 rac rhel 7
因主机性能不满足要求,更换新的服务器,存储通过emc克隆一份新的
先在新机器上划分3个10g的共享盘,安装GI、db软件,不建库
识别存储
-
[grid@db1-[+ASM1]-/home/grid]$ ls -l /dev/|grep -E 'emc|asm'|head
-
drwxr-xr-x 2 root root 100 Aug 11 17:14 asmdisk
-
crw-r--r-- 1 root root 10, 55 Aug 11 17:14 emcpower
-
brw-rw---- 1 grid asmadmin 120, 0 Aug 12 09:23 emcpowera
-
brw-rw---- 1 root disk 120, 416 Aug 11 17:14 emcpoweraa
-
brw-rw---- 1 root disk 120, 432 Aug 11 17:14 emcpowerab
-
brw-rw---- 1 root disk 120, 448 Aug 11 17:14 emcpowerac
-
brw-rw---- 1 root disk 120, 464 Aug 11 17:14 emcpowerad
-
brw-rw---- 1 root disk 120, 480 Aug 11 17:14 emcpowerae
-
brw-rw---- 1 root disk 120, 496 Aug 11 17:14 emcpoweraf
-
brw-rw---- 1 root disk 120, 512 Aug 11 17:14 emcpowerag
-
[grid@db1-[+ASM1]-/home/grid]$
-
属主还是root,还未绑定,ocrdg三个新磁盘
-
-
[grid@db1-[+ASM1]-/home/grid]$ kfod disks=all
-
--------------------------------------------------------------------------------
-
Disk Size Path User Group
-
================================================================================
-
1: 10241 MB /dev/asmdisk/OCR01 grid asmadmin
-
2: 10241 MB /dev/asmdisk/OCR02 grid asmadmin
-
3: 10241 MB /dev/asmdisk/OCR03 grid asmadmin
-
--------------------------------------------------------------------------------
-
ORACLE_SID ORACLE_HOME
-
================================================================================
-
-
root:
-
export ORACLE_HOME=/oracle/app/19.3.0/grid
-
for i in `ls /dev/emcpow*`; do val=` $ORACLE_HOME/bin/kfed read de=$i|grep dskname|awk '{print $2}'`;echo $val $i `/usr/lib/udev/scsi_id -gud $i`; done|sort
-
识别出设备对应的asm磁盘组,然后进行绑定
-
-
for i in `cat /proc/partitions | awk {'print $4'} |grep emcpower`; do val=`/sbin/blockdev --getsize64 /dev/$i` ; val2=`expr $val / 1073741824`; echo "/dev/$i: $val2 `/usr/lib/udev/scsi_id -gud /dev/$i`" ; done
-
-
rm -fr /tmp/a.rules
-
for i in ` grep emcpower /proc/partitions|awk {'print $4'} ` ;
-
do
-
echo "KERNEL==\"emcpower*\",SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/usr/lib/udev/scsi_id -gud /dev/$i`\", SYMLINK+=\"asmdisk/DATA26\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\" " >> /tmp/a.rules ;
-
done
-
cat /tmp/a.rules
-
-
确认无误后,将 a.rules中内容合并到现在的udev文件里
-
-
/sbin/udevadm control --reload-rules
-
/sbin/udevadm trigger --type=devices --action=change
-
-
grid:
-
sqlplus / as sysasm
-
alter diskgroup archdg mount;
-
alter diskgroup datadg mount;
-
-
确认磁盘组状态、大小正常
-
asmcmd lsdg
-
-
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
-
MOUNTED EXTERN N 512 512 4096 1048576 759572 709834 0 709834 0 N ARCHDG/
-
MOUNTED EXTERN N 512 512 4096 1048576 1450092 350074 0 350074 0 N DATADG/
-
MOUNTED NORMAL N 512 512 4096 4194304 30720 29748 10240 9754 0 Y OCRDG/
编辑一个initorcl1.ora文件,启动实例即可。
阅读(645) | 评论(0) | 转发(0) |