ASM更换磁盘名称

今天他们要测试IBM的那个SVC存储同步的东西,然后需要把服务器上的盘都踢出去后再加进来,不过这样的话磁盘名称就会变了。因此需要把ASM中的磁盘名称都换了,其实过程也很简单:

1、修改asm实例的asm磁盘默认查找路径参数asm_diskstring,使用如下命令:

alter system set asm_diskstring=’/dev/rhdisk*’;

2、关闭整个Cluster,等待他们踢盘加盘后再修改如下属性,我的是RAC环境所以一下操作要在所有节点上执行:

修改磁盘用户及属组:

[rac11g2@root]# chown grid:asmadmin /dev/rhdisk[2-4]

修改磁盘属性为660:

[rac11g2@root]# chmod 660 /dev/rhdisk[2-4]

修改磁盘共享属性:

[rac11g2@root]# lsattr -El hdisk2|grep reserve_policyreserve_policy no_reserve Reserve Policy True

[rac11g2@root]# chdev -l hdisk2 -a reserve_policy=no_reserve[rac11g2@root]# chdev -l hdisk3 -a reserve_policy=no_reserve[rac11g2@root]# chdev -l hdisk4 -a reserve_policy=no_reserve

3、现在就可以启动Cluster了

[rac11g1@root]# crsctl start cluster -all

注:我曾经因为忘了修改磁盘属性为660,结果导致Database起不来,在Alert日志中出现了ORA-00600的错误,吓我一跳,不过从日志中比较容易看出来是权限的问题,调整磁盘属性后再重启就可以了:

Sweep [inc][393409]: completedSweep [inc2][393409]: completedNOTE: Loaded library: SystemORA-15025: could not open disk “/dev/rhdisk4″ORA-27041: unable to open fileIBM AIX RISC System/6000 Error: 13: Permission deniedAdditional information: 11SUCCESS: diskgroup DATA was mountedErrors in file /soft/Oracle/diag/rdbms/nint/nint1/trace/nint1_ckpt_19136654.trc (incident=409793):ORA-00600: internal error code, arguments: [kfioTranslateIO03], [], [], [], [], [], [], [], [], [], [], []Incident details in: /soft/oracle/diag/rdbms/nint/nint1/incident/incdir_409793/nint1_ckpt_19136654_i409793.trcUse ADRCI or Support Workbench to package the incident.See Note 411.1 at My Oracle Support for error and packaging details.NOTE: dependency between database nint and diskgroup resource ora.DATA.dg is establishedERROR: unrecoverable error ORA-600 raised in ASM I/O path; terminating process 19136654Dumping diagnostic data in directory=[cdmp_20120302172201], requested by (instance=1, osid=19136654 (CKPT)), summary=[incident=409793].Fri Mar 02 17:22:01 2012PMON (ospid: 14156014): terminating the instance due to error 469System state dump requested by (instance=1, osid=14156014 (PMON)), summary=[abnormal instance termination].System State dumped to trace file /soft/oracle/diag/rdbms/nint/nint1/trace/nint1_diag_21168306.trcFri Mar 02 17:22:02 2012ORA-1092 : opitsk aborting processFri Mar 02 17:22:02 2012License high water mark = 1Instance terminated by PMON, pid = 14156014USER (ospid: 15335672): terminating the instanceInstance terminated by USER, pid = 15335672

【摘录】

First, you can try to check the OS drive ownership , permission and reserve_policy attribute on all nodes. Then restart the ASM instance. 1)Make sure that the hdisk# is owned by the OS user who installed the ASM Oracle Home … and that the disk is mounted correctly (with the correct owner) 2)Make sure that the permissions are set correctly at the disk level … 660 is normal … but if there are problems use 777 as a test ls -l /dev/rhdisk3 output: For 10gR2/11gR1 like: crw-rw—- oracle:oinstall /dev/rhdisk3 For 11gR2 like: crw-rw—- grid:asmadmin /dev/rhdisk3 How to change the drive ownership and permission ? For 10gR2/11gR1: # chown -R oracle:oinstall /dev/rhdisk[3-10] # chmod -R 660 /dev/rhdisk[3-10] For 11gR2: # chown -R grid:asmadmin /dev/rhdisk[3-10] # chmod -R 660 /dev/rhdisk[3-10] 3)Make sure that the reserve_policy attribute of the needed hdisk# is no_reserve or no on all nodes. chdev -l hdisk# -a reserve_policy=no_reserveIf it also fail by the first step, you may try to set the Oracle ASM parameter ASM_DISKSTRING to /dev/* or /dev/rhdisk*. The Step is:1)Backup the ASM instance pfile(Parameter File) or spfile (Server Parameter File). Most in the $ORACLE_HOME/dbs. pfile name like is init+ASM1.ora, you can use cp command to backup it .and vi the content. You to create spfile to pfile for backup,if use spfile.2)set ASM_DISKSTRING parameter use pfile ENV: Add or Edit “ASM_DISKSTRING” line to *.ASM_DISKSTRING=’/dev/rhdisk*’ in pfile. Startup the ASM instance using the pfile. use spfile ENV: $ ORACLE_SID=+ASM1;export ORACLE_SID $ sqlplus “/ as sysdba” or $ sqlplus “/ as sysasm” SQL> startup SQL> alter system set asm_diskstring=’/dev/rhdisk*’; SQL> select group_number,disk_number,path from v$asm_disk; –You can get some disk info and the most disk’s group_number is not 0.If ASM_DISKSTRING is NOT SET … then the following default is used Default ASM_DISKSTRING per OS Operating System Default Search String ======================================= Solaris (32/64 bit) /dev/rdsk/* Windows NT/XP \\.\orcldisk* Linux (32/64 bit) /dev/raw/* LINUX (ASMLIB) ORCL:* LINUX (ASMLIB) /dev/oracleasm/disks/* ( as a workaround ) HPUX /dev/rdsk/* HP-UX(Tru 64) /dev/rdisk/* AIX /dev/*

,而有的旅行是释放负面情绪,换个心情,轻装上阵。

ASM更换磁盘名称

相关文章:

你感兴趣的文章:

标签云: