Here are the simple steps for mapping between ASM disks and physical disks in Linux.
Subscribe to get access
Read more of this content when you subscribe today.
Here are the simple steps for mapping between ASM disks and physical disks in Linux.
Read more of this content when you subscribe today.
It is a good practice to store ASM password file into ASM diskgroup instead of local disk.
Verifying system upgrade readiness for Grid Infrastructure 12.1.0.2 to 12.2.0.1 with below command, then get “PRVG-10091” warning:
$ /u01/app/12.2.0.1/grid/runcluvfy.sh stage -pre crsinst -upgrade -rolling -src_crshome /u01/app/12.1.0.2/grid -dest_crshome /u01/app/12.2.0.1/grid -dest_version 12.2.0.1.0 -fixupnoexec -verbose ... .. . Verifying Verify that the ASM instance was configured using an existing ASM parameter file. ...FAILED PRVG-10091 : failed to retrieve the ASM password file location for an ASM instance. ... .. .
Read more of this content when you subscribe today.
Try to set ASM diskgroup attribute, then get the following errors:
$ sqlplus / as sysdba ... .. . SQL> alter diskgroup OCR_VOTE SET ATTRIBUTE 'compatible.asm' ='11.2.0.2'; alter diskgroup OCR_VOTE SET ATTRIBUTE 'compatible.asm' ='11.2.0.2' * ERROR at line 1: ORA-15032: not all alterations performed ORA-15260: permission denied on ASM disk group
Read more of this content when you subscribe today.
It is recommended to put OCR, Voting File and ASM SPILE onto a dedicated diskgroup.
This exercise is to move everything from old OCR/VOTING diskgroup OCR_VOTE to a new diskgroup OCR_VOTE2 in 11.2.0.4.
Read more of this content when you subscribe today.
The alternative for relocating ASM datafiles by RMAN commands :
CATALOG START WITH “+DATA2/../”
SWITCH DATABASE TO COPY.
This task is to relocate all the datafiles of diskgroup DATA1 to another diskgroup DATA2 for a standby database.
1)Check the diskgroup space availability.
SQL> set pagesize 120
SQL> set linesize 180
SQL> select NAME,TOTAL_MB/1024,FREE_MB/1024,USABLE_FILE_MB/1024
from v$asm_diskgroup;
NAME T TOTAL_MB/1024 FREE_MB/1024 USABLE_FILE_MB/1024
--------- ------------- ------------ -------------------
DATA1 1024.00977 15.6894531 15.6894531
OCR_VOTE 19.9931641 15.4257813 15.4257813
FRA 500.069336 210.331055 210.331055
DATA2 4000.55469 1816.02344 1816.02344
2)Leave managed standby database recovery still going. Create a RMAN script by using below query:
SQL> select 'backup as copy datafile '||file#||' format ''+DATA2'';'
from v$datafile
where name like '+DATA1%' order by 1;
'BACKUPASCOPYDATAFILE'||FILE#||'FORMAT''+DATA2'';'
---------------------------------------------------
backup as copy datafile 124 format '+DATA2';
backup as copy datafile 125 format '+DATA2';
backup as copy datafile 126 format '+DATA2';
backup as copy datafile 127 format '+DATA2';
.....
....
...
..
.
The final RMAN script content:
$cat move_DATA1_to_DATA2.rman
run {
allocate channel stdbych1 type disk;
allocate channel stdbych2 type disk;
allocate channel stdbych3 type disk;
allocate channel stdbych4 type disk;
backup as copy datafile 124 format '+DATA2';
backup as copy datafile 125 format '+DATA2';
backup as copy datafile 126 format '+DATA2';
backup as copy datafile 127 format '+DATA2';
....
...
..
.
}
3) Run the RMAN script to make a copy of all datafiles on diskgroup DATA1 onto diskgroup DATA2.
$nohup rman target / cmdfile=/u01/app/oracle/admin/scripts/move_DATA1_to_DATA2.rman log=/u01/app/oracle/admin/scripts/move_DATA1_To_DATA2.log &
4) Stop the managed standby database recovery.
SQL> alter database recover managed standby database cancel; Database altered.
5) Switch the datafiles.
RMAN>switch datafile 124 to copy; RMAN>switch datafile 125 to copy; RMAN>switch datafile 126 to copy; RMAN>switch datafile 127 to copy; .... ... .. .
6) Start the recovery.
SQL> alter database recover managed standby database using current logfile disconnect from session; Database altered.
5) Archive log switch, check applied from alert.log, etc.
SQL>alter system archive log current ; System altered.
6) Unmount diskgroup DATA1 on all the nodes, except the current node.
SQL> alter diskgroup data1 dismount; Diskgroup altered.
7) Drop the diskgroup DATA1.
SQL> drop diskgroup data1; drop diskgroup data1 * ERROR at line 1: ORA-15039: diskgroup not dropped ORA-15053: diskgroup "DATA1" contains existing files SQL> drop diskgroup data1 including contents; Diskgroup dropped.
8) Scan disks and confirm the ASM Disks of DATA1 have been removed from ASM disks.
$su - # oracleasm listdisks ASM_DISK01 ASM_DISK02 ASM_DISK03 ASM_DISK04 ASM_DISK05 ASM_DISK06 ASM_DISK07 ASM_DISK08 ASM_FRA01 ASM_SSD1 <----- DATA1 diskgroup OCR_VOTE01 # oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Cleaning disk "ASM_SSD1" Scanning system for ASM disks... # oracleasm listdisks ASM_DISK01 ASM_DISK02 ASM_DISK03 ASM_DISK04 ASM_DISK05 ASM_DISK06 ASM_DISK07 ASM_DISK08 ASM_FRA01 OCR_VOTE01