Saturday, October 19, 2013

Normal & High Redundancy in ASM


Usage of ASM Normal or High Redundancy.
--------------------------------------

1. Back up the database.


2. Current Size of diskgroups.


SQL> select name, total_mb, usable_file_mb from V$asm_Diskgroup;

NAME                             TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
ACFDG                                9759            581
DATA                                 3871           1977
FRA                                  1918           1816
OCR_VOTING                           2868            436

 
SQL> select tablespace_name, file_name, bytes/1024/1024 "M" from dba_data_files order by 1;

TABLESPACE_NAME                FILE_NAME                                                   M
------------------------------ -------------------------------------------------- ----------
GOLDEN_GATE                    +DATA/layatest/datafile/golden_gate01.dbf                  50
MANZOOR                        +DATA/layatest/datafile/manzoor01.dbf                      50
SYSAUX                         +DATA/layatest/datafile/sysaux.257.810788857              600
SYSTEM                         +DATA/layatest/datafile/system.256.810788853              710
UNDOTBSONE                     +DATA/layatest/datafile/undotbsone.dbf                     50
UNDOTBSTWO                     +DATA/layatest/datafile/undotbstwo.dbf                     50
USERS                          +DATA/layatest/datafile/users.259.810788857                 5

7 rows selected.

SQL> select file_name, bytes/1024/1024 "M" from dba_temp_files;

FILE_NAME                                                   M
-------------------------------------------------- ----------
+DATA/layatest/tempfile/temp.263.810789031                 38


From ASM instance:-


SQL> select name, total_mb, usable_file_mb , state, type from V$asm_diskgroup;

NAME                             TOTAL_MB USABLE_FILE_MB STATE       TYPE
------------------------------ ---------- -------------- ----------- ------
ACFDG                                9759            581 MOUNTED     EXTERN
DATA                                 3871           1977 CONNECTED   EXTERN
FRA                                  1918           1816 CONNECTED   EXTERN
OCR_VOTING                           2868            436 MOUNTED     NORMAL


NAME                           FAILGROUP                      PATH                                       TOTAL_MB HEADER_STATU REDUNDA
------------------------------ ------------------------------ ---------------------------------------- ---------- ------------ -------
ACFSDISK                       ACFSDISK                       /dev/oracleasm/disks/ACFSDISK                  9759 MEMBER       UNKNOWN
FRA                            FRA                            /dev/oracleasm/disks/FRA                       1918 MEMBER       UNKNOWN
DATA                           DATA                           /dev/oracleasm/disks/DATA                      3871 MEMBER       UNKNOWN
OCR_VOTING_0002                OCR_VOTING_0002                /dev/oracleasm/disks/OCR_VOT_DISK_3             956 MEMBER       UNKNOWN
OCR_VOTING_0001                OCR_VOTING_0001                /dev/oracleasm/disks/OCR_VOT_DISK_2             956 MEMBER       UNKNOWN
OCR_VOTING_0000                OCR_VOTING_0000                /dev/oracleasm/disks/OCR_VOT_DISK_1             956 MEMBER       UNKNOWN




objective:-
---------

The database is using the diskgroup which is external redundancy, now we are going to conver that to normal redundany.


Stop the database.

[oracle@rhel11gr2rac1 software]$ srvctl stop database -d LAYATEST


Take the Metadata backup of the diskgroups.


ASMCMD> md_backup /software/asm_diskgrp_bkp -G DATA,FRA
Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: FRA
Current alias directory path: LAYATEST/TEMPFILE
Current alias directory path: LAYATEST/DATAFILE
Current alias directory path: LAYATEST/ONLINELOG
Current alias directory path: LAYATEST
Current alias directory path: LAYATEST/CONTROLFILE
Current alias directory path: LAYATEST/PARAMETERFILE
Current alias directory path: LAYATEST/ARCHIVELOG
Current alias directory path: LAYATEST
Current alias directory path: LAYATEST/ARCHIVELOG/2013_10_18


Drop the diskgroups.

-- For droping a diskgorup it should be mounted only on one node. You can use sqlplus or asmcmd to drop the
diskgroups.


Node 2.


SQL> alter diskgroup data dismount;

Diskgroup altered.

SQL> alter diskgroup fra dismount;

Diskgroup altered.


Node 1
------

ASMCMD> dropdg -r data
ASMCMD> dropdg -r fra


here we dont have additional disk so as to create the new diskgroups with normal redundancy, hence we have dropped the disk
and we are going to parition the disk with different sizes and then we are going to create the normal redundancy diskgroup.


From the earlier data we know the disks of DATA and FRA diskgroup which are as below.


NAME                           FAILGROUP                      PATH                                       TOTAL_MB HEADER_STATU REDUNDA
------------------------------ ------------------------------ ---------------------------------------- ---------- ------------ -------
FRA                            FRA                            /dev/oracleasm/disks/FRA                       1918 MEMBER       UNKNOWN
DATA                           DATA                           /dev/oracleasm/disks/DATA                      3871 MEMBER       UNKNOWN


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm listdisks
ACFSDISK
DATA
FRA
OCR_VOT_DISK_1
OCR_VOT_DISK_2
OCR_VOT_DISK_3

[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm querydisk /dev/s* | grep "DATA"

Device "/dev/sdi1" is marked an ASM disk with the label "DATA"

[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm querydisk /dev/s* | grep "FRA"

Device "/dev/sdk1" is marked an ASM disk with the label "FRA"

-- so the physical disk for DATA asm disk is /dev/sdi1 and for FRA asm disk is /dev/sdk1


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm deletedisk DATA
Removing ASM disk "DATA":                                  [  OK  ]

[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm deletedisk FRA
Removing ASM disk "FRA":                                   [  OK  ]


Delete the paritiion on /dev/sdi and /dev/sdk


[root@rhel11gr2rac1 ~]# fdisk /dev/sdi

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.



[root@rhel11gr2rac1 ~]# fdisk /dev/sdk

Command (m for help): d
Selected partition 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.


[root@rhel11gr2rac1 ~]# fdisk -l /dev/sdi

Disk /dev/sdi: 4060 MB, 4060086272 bytes
125 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes

   Device Boot      Start         End      Blocks   Id  System

[root@rhel11gr2rac1 ~]# fdisk -l /dev/sdk

Disk /dev/sdk: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes

   Device Boot      Start         End      Blocks   Id  System


Now the partitions are deleted, now we can create more partion on these devices.


[root@rhel11gr2rac1 ~]# fdisk /dev/sdi

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1023, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1023, default 1023): +2000M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (506-1023, default 506):
Using default value 506
Last cylinder or +size or +sizeM or +sizeK (506-1023, default 1023): +2000M

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@rhel11gr2rac1 ~]# fdisk /dev/sdk

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1022, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1022, default 1022): +1000M

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (510-1022, default 510):
Using default value 510
Last cylinder or +size or +sizeM or +sizeK (510-1022, default 1022): 1000M

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.


Now list the partitions.

[root@rhel11gr2rac1 ~]# fdisk -l /dev/sdi

Disk /dev/sdi: 4060 MB, 4060086272 bytes
125 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1         505     1956844   83  Linux
/dev/sdi2             506        1010     1956875   83  Linux
[root@rhel11gr2rac1 ~]# fdisk -l /dev/sdk

Disk /dev/sdk: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdk1               1         509      978267   83  Linux
/dev/sdk2             510        1000      943702   83  Linux

Now execute the below on the next node to make sync with the first node and check the new partitions.

[root@rhel11gr2rac2 ~]# partbrobe

[root@rhel11gr2rac2 ~]# fdisk -l /dev/sdi

Disk /dev/sdi: 4060 MB, 4060086272 bytes
125 heads, 62 sectors/track, 1023 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1         505     1956844   83  Linux
/dev/sdi2             506        1010     1956875   83  Linux


[root@rhel11gr2rac2 ~]# fdisk -l /dev/sdk

Disk /dev/sdk: 2013 MB, 2013265920 bytes
62 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdk1               1         509      978267   83  Linux
/dev/sdk2             510        1000      943702   83  Linux



Now create the asm disk on these physical devices.


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm createdisk DATA1 /dev/sdi1
Marking disk "DATA1" as an ASM disk:                       [  OK  ]


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm createdisk DATA2 /dev/sdi2
Marking disk "DATA2" as an ASM disk:                       [  OK  ]


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm createdisk FRA1 /dev/sdk1
Marking disk "FRA1" as an ASM disk:                        [  OK  ]
[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm createdisk FRA2 /dev/sdk2
Marking disk "FRA2" as an ASM disk:                        [  OK  ]


[root@rhel11gr2rac1 ~]# /etc/init.d/oracleasm listdisks
ACFSDISK
DATA1
DATA2
FRA1
FRA2
OCR_VOT_DISK_1
OCR_VOT_DISK_2
OCR_VOT_DISK_3


Node 2

[root@rhel11gr2rac2 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:               [  OK  ]

[root@rhel11gr2rac2 ~]# /etc/init.d/oracleasm listdisks
ACFSDISK
DATA1
DATA2
FRA1
FRA2
OCR_VOT_DISK_1
OCR_VOT_DISK_2
OCR_VOT_DISK_3

Now connect to the asm instance and create the diskgroup.


SQL> create diskgroup DATA normal redundancy disk '/dev/oracleasm/disks/DATA1','/dev/oracleasm/disks/DATA2';

Diskgroup created.

SQL> create diskgroup FRA normal redundancy disk '/dev/oracleasm/disks/FRA1','/dev/oracleasm/disks/FRA2';

Diskgroup created.

Now restore the meta data using asmcmd.


ASMCMD> md_restore --nodg -G data --silent /software/asm_diskgrp_bkp
Current Diskgroup metadata being restored: DATA
ASMCMD-9360: ADD or ALTER ATTRIBUTE failed
ORA-15032: not all alterations performed
ORA-15242: could not set attribute _._DIRVERSION
ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher (DBD ERROR: OCIStmtExecute)
System template TEMPFILE modified!
System template CONTROLFILE modified!
System template XTRANSPORT modified!
System template DATAFILE modified!
System template ARCHIVELOG modified!
System template CHANGETRACKING modified!
System template DUMPSET modified!
System template PARAMETERFILE modified!
System template OCRFILE modified!
System template ONLINELOG modified!
System template FLASHBACK modified!
System template AUTOBACKUP modified!
System template DATAGUARDCONFIG modified!
System template ASMPARAMETERFILE modified!
System template FLASHFILE modified!
System template BACKUPSET modified!
Directory +DATA/LAYATEST re-created!
Directory +DATA/LAYATEST/DATAFILE re-created!
Directory +DATA/LAYATEST/CONTROLFILE re-created!
Directory +DATA/LAYATEST/ONLINELOG re-created!
Directory +DATA/LAYATEST/TEMPFILE re-created!
Directory +DATA/LAYATEST/PARAMETERFILE re-created!

ASMCMD> md_restore --nodg -G FRA --silent /software/asm_diskgrp_bkp
Current Diskgroup metadata being restored: FRA
ASMCMD-9360: ADD or ALTER ATTRIBUTE failed
ORA-15032: not all alterations performed
ORA-15242: could not set attribute _._DIRVERSION
ORA-15221: ASM operation requires compatible.asm of 11.1.0.0.0 or higher (DBD ERROR: OCIStmtExecute)
System template XTRANSPORT modified!
System template ONLINELOG modified!
System template DATAGUARDCONFIG modified!
System template AUTOBACKUP modified!
System template TEMPFILE modified!
System template OCRFILE modified!
System template ARCHIVELOG modified!
System template DUMPSET modified!
System template CONTROLFILE modified!
System template BACKUPSET modified!
System template ASMPARAMETERFILE modified!
System template FLASHBACK modified!
System template PARAMETERFILE modified!
System template FLASHFILE modified!
System template DATAFILE modified!
System template CHANGETRACKING modified!
Directory +FRA/LAYATEST re-created!
Directory +FRA/LAYATEST/ARCHIVELOG re-created!
Directory +FRA/LAYATEST/ARCHIVELOG/2013_10_18 re-created!

Now restore the database from the backup.

rman target /


RMAN> startup nomount

connected to target database (not started)
startup failed: ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/layatest/spfilelayatest.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/layatest/spfilelayatest.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA/layatest/spfilelayatest.ora
ORA-15173: entry 'spfilelayatest.ora' does not exist in directory 'layatest'
ORA-06512: at line 4

starting Oracle instance without parameter file for retrieval of spfile
Oracle instance started

Total System Global Area     158662656 bytes

Fixed Size                     2226456 bytes
Variable Size                104859368 bytes
Database Buffers              46137344 bytes
Redo Buffers                   5439488 bytes


RMAN> restore spfile from '/software/layatest_db_backup_20131019_19_0compio9_1_1';

Starting restore at 19-OCT-13
using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /software/layatest_db_backup_20131019_19_0compio9_1_1
channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete
Finished restore at 19-OCT-13

RMAN> restore controlfile from '/software/layatest_db_backup_20131019_19_0bompin3_1_1';

Starting restore at 19-OCT-13
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:18
output file name=+DATA/layatest/controlfile/current.257.829179675
Finished restore at 19-OCT-13

RMAN> alter database mount;

database mounted


RMAN> restore database;

Starting restore at 19-OCT-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 instance=layatest1 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=28 instance=layatest1 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=23 instance=layatest1 device type=DISK

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00006 to +DATA/layatest/datafile/golden_gate01.dbf
channel ORA_DISK_1: restoring datafile 00007 to +DATA/layatest/datafile/manzoor01.dbf
channel ORA_DISK_1: restoring datafile 00008 to +DATA/layatest/datafile/undotbstwo.dbf
channel ORA_DISK_1: reading from backup piece /software/layatest_db_backup_20131019_19_0aompim9_1_1
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00001 to +DATA/layatest/datafile/system.256.810788853
channel ORA_DISK_2: reading from backup piece /software/layatest_db_backup_20131019_19_08ompim7_1_1
channel ORA_DISK_3: starting datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_DISK_3: restoring datafile 00002 to +DATA/layatest/datafile/sysaux.257.810788857
channel ORA_DISK_3: restoring datafile 00004 to +DATA/layatest/datafile/users.259.810788857
channel ORA_DISK_3: restoring datafile 00009 to +DATA/layatest/datafile/undotbsone.dbf
channel ORA_DISK_3: reading from backup piece /software/layatest_db_backup_20131019_19_09ompim7_1_1
channel ORA_DISK_1: piece handle=/software/layatest_db_backup_20131019_19_0aompim9_1_1 tag=TAG20131019T090302
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:32
channel ORA_DISK_3: piece handle=/software/layatest_db_backup_20131019_19_09ompim7_1_1 tag=TAG20131019T090302
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:01:07
channel ORA_DISK_2: piece handle=/software/layatest_db_backup_20131019_19_08ompim7_1_1 tag=TAG20131019T090302
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:01:30
Finished restore at 19-OCT-13

RMAN> recover database;

Starting recover at 19-OCT-13
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=90
channel ORA_DISK_1: reading from backup piece /software/layatest_db_backup_20131019_19_0eompitc_1_1
channel ORA_DISK_2: starting archived log restore to default destination
channel ORA_DISK_2: restoring archived log
archived log thread=2 sequence=152
channel ORA_DISK_2: reading from backup piece /software/layatest_db_backup_20131019_19_0fompitc_1_1
channel ORA_DISK_3: starting archived log restore to default destination
channel ORA_DISK_3: restoring archived log
archived log thread=1 sequence=91
channel ORA_DISK_3: restoring archived log
archived log thread=2 sequence=153
channel ORA_DISK_3: reading from backup piece /software/layatest_db_backup_20131019_19_0gompitc_1_1
channel ORA_DISK_1: piece handle=/software/layatest_db_backup_20131019_19_0eompitc_1_1 tag=TAG20131019T090651
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_1_seq_90.256.829180679 thread=1 sequence=90
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=154
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=92
channel ORA_DISK_1: reading from backup piece /software/layatest_db_backup_20131019_19_0hompitc_1_1
channel ORA_DISK_2: piece handle=/software/layatest_db_backup_20131019_19_0fompitc_1_1 tag=TAG20131019T090651
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:04
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_2_seq_152.257.829180679 thread=2 sequence=152
channel ORA_DISK_2: starting archived log restore to default destination
channel ORA_DISK_2: restoring archived log
archived log thread=1 sequence=93
channel ORA_DISK_2: reading from backup piece /software/layatest_db_backup_20131019_19_0iompj26_1_1
channel ORA_DISK_1: piece handle=/software/layatest_db_backup_20131019_19_0hompitc_1_1 tag=TAG20131019T090651
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=155
channel ORA_DISK_1: reading from backup piece /software/layatest_db_backup_20131019_19_0jompj27_1_1
channel ORA_DISK_3: piece handle=/software/layatest_db_backup_20131019_19_0gompitc_1_1 tag=TAG20131019T090651
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:00:06
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_1_seq_91.258.829180679 thread=1 sequence=91
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_2_seq_153.259.829180679 thread=2 sequence=153
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_2_seq_154.260.829180683 thread=2 sequence=154
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_1_seq_92.261.829180683 thread=1 sequence=92
channel ORA_DISK_1: piece handle=/software/layatest_db_backup_20131019_19_0jompj27_1_1 tag=TAG20131019T090926
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:00
channel ORA_DISK_2: piece handle=/software/layatest_db_backup_20131019_19_0iompj26_1_1 tag=TAG20131019T090926
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:01
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_1_seq_93.262.829180683 thread=1 sequence=93
archived log file name=+FRA/layatest/archivelog/2013_10_19/thread_2_seq_155.263.829180685 thread=2 sequence=155
unable to find archived log
archived log thread=2 sequence=156
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/19/2013 15:58:05
RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 156 and starting SCN of 3317418

RMAN> alter database open resetlogs;

database opened


Asm instance.
=============

SQL> select path, name, total_mb, free_mb, failgroup from V$asm_disk;

PATH                                               NAME                             TOTAL_MB    FREE_MB FAILGROUP                    
-------------------------------------------------- ------------------------------ ---------- ---------- ------------------------------
/dev/oracleasm/disks/ACFSDISK                      ACFSDISK                             9759        581 ACFSDISK                      
/dev/oracleasm/disks/FRA2                          FRA_0001                              921        855 FRA_0001                      
/dev/oracleasm/disks/FRA1                          FRA_0000                              955        888 FRA_0000                      
/dev/oracleasm/disks/DATA2                         DATA_0001                            1911        824 DATA_0001                    
/dev/oracleasm/disks/DATA1                         DATA_0000                            1910        822 DATA_0000                    
/dev/oracleasm/disks/OCR_VOT_DISK_3                OCR_VOTING_0002                       956        608 OCR_VOTING_0002              
/dev/oracleasm/disks/OCR_VOT_DISK_2                OCR_VOTING_0001                       956        608 OCR_VOTING_0001              
/dev/oracleasm/disks/OCR_VOT_DISK_1                OCR_VOTING_0000                       956        612 OCR_VOTING_0000              


SQL> alter diskgroup data set attribute 'disk_repair_time' = '10h';
alter diskgroup data set attribute 'disk_repair_time' = '10h'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15242: could not set attribute disk_repair_time
ORA-15283: ASM operation requires compatible.rdbms of 11.1.0.0.0 or higher


SQL> alter diskgroup data set attribute 'compatible.rdbms' = '11.1';

Diskgroup altered.

SQL> alter diskgroup data set attribute 'disk_repair_time' = '10h';

Diskgroup altered.


Since we have the normal redundancy so even when one disk goes (failgroup) goes offline still it will
serve the database with the other failgroup disk.

So for normal redundancy we required minimum 2 disk.

If we are using high redundancy we need minimum of 3 disk (i.e. even if two disk goes offline still
the databse will be serverd using the remaining disk.

ASM fast resync keeps track of pending changes to extents on an OFFLINE disk during an outage.
The extents are resynced when the disk is brought back online.

By default, ASM drops a disk in 3.6 hours after it is taken offline. You can set the DISK_REPAIR_TIME attribute
to delay the drop operation by specifying a time interval to repair the disk and bring it back online.
The time can be specified in units of minutes (m or M) or hours (h or H). If you omit the unit,
then the default unit is hours.

If the attribute is not set explicitly, then the default value (3.6h) applies to disks that have been
set to OFFLINE mode without an explicit DROP AFTER clause. Note that disks taken offline due to I/O
errors do not have a DROP AFTER clause.

The default DISK_REPAIR_TIME attribute value is an estimate that should be adequate for most environments.
However, make sure that the attribute value is set to the amount of time that you think is necessary in your
environment to fix any transient disk error and that you are willing to tolerate reduced data redundancy.

The elapsed time (since the disk was set to OFFLINE mode) is incremented only when the disk group containing
the offline disks is mounted. The REPAIR_TIME column of V$ASM_DISK shows the amount of time left (in seconds)
before an offline disk is dropped. After the specified time has elapsed, ASM drops the disk. You can override
this attribute with an ALTER DISKGROUP DISK OFFLINE statement and the DROP AFTER clause.


SQL> alter diskgroup data offline disk 'DATA_0001';

Diskgroup altered.


SQL> select path, name, total_mb, free_mb from V$asm_disk;

PATH                                               NAME                             TOTAL_MB    FREE_MB
-------------------------------------------------- ------------------------------ ---------- ----------
/dev/oracleasm/disks/DATA2                                                                 0          0
                                                   DATA_0001                            1911        824
/dev/oracleasm/disks/ACFSDISK                      ACFSDISK                             9759        581
/dev/oracleasm/disks/FRA2                          FRA_0001                              921        855
/dev/oracleasm/disks/FRA1                          FRA_0000                              955        888
/dev/oracleasm/disks/DATA1                         DATA_0000                            1910        822
/dev/oracleasm/disks/OCR_VOT_DISK_3                OCR_VOTING_0002                       956        608
/dev/oracleasm/disks/OCR_VOT_DISK_2                OCR_VOTING_0001                       956        608
/dev/oracleasm/disks/OCR_VOT_DISK_1                OCR_VOTING_0000                       956        612


SQL> select name, total_mb, usable_file_mb, state from V$asm_diskgroup;

NAME                             TOTAL_MB USABLE_FILE_MB STATE
------------------------------ ---------- -------------- -----------
ACFDG                                9759            581 MOUNTED
OCR_VOTING                           2868            436 MOUNTED
DATA                                 1910            411 MOUNTED
FRA                                  1876            871 MOUNTED

SQL> alter diskgroup data online disk 'DATA_0001';

Diskgroup altered.

SQL> select name, total_mb, usable_file_mb, state from V$asm_diskgroup;

NAME                             TOTAL_MB USABLE_FILE_MB STATE
------------------------------ ---------- -------------- -----------
ACFDG                                9759            581 MOUNTED
OCR_VOTING                           2868            436 MOUNTED
DATA                                 3821            823 MOUNTED
FRA                                  1876            871 MOUNTED



















No comments:

Post a Comment