转-RedHat 7.3 修改ASM磁盘绑定路径

RedHat 7中,很多命令发生了改变,绑定磁盘不再是start_udev,而是udevadm,具体绑定方式,

请看另一篇博文:http://www.cnblogs.com/zx3212/p/6757394.html

1、首先在系统层面查看磁盘绑定情况,如下

[root@raca1 ~]# ls -l /dev/asm*

lrwxrwxrwx 1 root root 4 Apr 24 15:34 /dev/asm-datadisk1 -> sdf2

lrwxrwxrwx 1 root root 4 Apr 24 15:39 /dev/asm-datadisk2 -> sdg2

lrwxrwxrwx 1 root root 4 Apr 24 15:39 /dev/asm-ocrdisk1 -> sdb2

lrwxrwxrwx 1 root root 4 Apr 24 15:17 /dev/asm-ocrdisk2 -> sdc2

lrwxrwxrwx 1 root root 4 Apr 24 15:17 /dev/asm-ocrdisk3 -> sdd2

lrwxrwxrwx 1 root root 4 Apr 24 15:40 /dev/asm-ocrdisk4 -> sde2

2、群集创建完毕,发现在创建ASM磁盘时路径选择错误,应该选择/dev/asm*,结果错选成了/dev/sd*:

SQL> select name,path from v$asm_disk;

NAME PATH

—————————————-

/dev/sdf2

/dev/sdg2 MGMT_0000

/dev/sde2 VOTE_0002

/dev/sdd2 VOTE_0000

/dev/sdb2 VOTE_0001

/dev/sdc2

rows selected.

SQL> show parameter string

NAME TYPE VALUE

———————————— ———– ——————————

asm_diskstring string /dev/sd*
3、修改参数asm_diskstring:

SQL> alter system set asm_diskstring=’/dev/asm*’ scope=spfile;

System altered.

4、生成一个pfile,防止后续数据库无法启动,可用此pfile文件启动数据库

SQL> create pfile=’/tmp/pfileraca.ora’ from spfile;

File created.

SQL> quit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production

[grid@raca2 ~]$ exit

logout

5、用root用户进入到GI的HOME/bin目录下,重新启动集群

[root@raca2 ~]# cd /u01/grid/app/12.2.0/bin/

[root@raca2 bin]# ./crsctl stop cluster

[root@raca2 bin]# ./crsctl start cluster

6、进入ASM实例查看路径情况,已修改完成

[grid@raca2 ~]$ sqlplus / as sysasm

SQL> show parameter string

NAME TYPE VALUE

———————————— ———– ——————————

asm_diskstring string /dev/asm*

SQL> select name,path from v$asm_disk;

NAME PATH

————————- ——————————

/dev/asm-datadisk2

/dev/asm-datadisk1

VOTE_0002 /dev/asm-ocrdisk3

MGMT_0000 /dev/asm-ocrdisk4

VOTE_0001 /dev/asm-ocrdisk2

VOTE_0000 /dev/asm-ocrdisk1

rows selected.

本文转自: https://www.cnblogs.com/zx3212/p/6757256.html

Leave a Reply