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文件,启动实例即可。
阅读(535) | 评论(0) | 转发(0) |