ASM’ e create edilmiş olan bir diskgroup’ un ismini nasıl değiştirebiliriz bunu testini yapıyor olacağız.
Aslında bu yazının başlığı içerik ile tam olar3ak örtüşmedi. Bu yazıda anlatılmak istenen temel amaç bir diskgroup nasıl rename edileceği olsa da, bu yazı ile birlikte ;
• Bir diskgroup nasıl rename edilir,
• ASM database’ inin spfile’ i nasıl farklı bir diskgroup altına taşınır,
• OCR/Voting diskler nasıl farklı bir diskgroup altına taşınır,
• Cluster servislerinde değişiklikler nasıl yapılır,
• RAC instance’ nın controlfile’ leri nasıl farklı bir diskgroup altına taşınır,
• RAC instance’ nın datafile ve redologları nasıl rename edilir,
gibi sorulara da bu yazıda cevap veriyor olacağız. Yazı içerisinde bu işlemi yaparken karşılaşılması muhtemel sorunlarıda anlattığımdan dolayı bolca hatalar ve bu hataların nasıl çözüleceği ile ilgili çözüm yöntemlerini göreceksiniz.
Bunun için oracle’ ın renamedg tool’ undan faydalanıyor olacağız. Komutun hangi parametreleri aldığını ve syntax’ ını aşağıda detaylı olarak görebilirsiniz.
1 2 3 4 5 6 7 |
renamedg [phase={ one|two |both } ] dgname=diskgroup newdgname=newdiskgroup [config=configfile] [ asm_diskstring=discoverystring, discoverystring ... ] [ clean={true|false} ] [ check={true|false} ] [ confirm={true|false}] [ verbose={ true|false} ] [ keep_voting_files={true|false}] |
Şimdi ilk rename denememizi oragrid userı ile aşağıdaki komutla yaparak başlayalım ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[oragrid@Node1 ~]$ renamedg dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring='/dev/mapper/grd-asm1p1' verbose=true NOTE: No asm libraries found in the system Parsing parameters.. Parameters in effect: Old DG name : DATAXX_0000 New DG name : DATA1 Phases : Phase 1 Phase 2 Discovery str : /dev/mapper/grd-asm1p1 Clean : TRUE Raw only : TRUE renamedg operation: dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring=/dev/mapper/grd-asm1p1 verbose=true Executing phase 1 Discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking for hearbeat... Re-discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking if the diskgroup is mounted or used by CSS Checking disk number:0 KFNDG-00405: file not found; arguments: [DATAXX_0000] Terminating kgfd context 0x7f764104c0a0 |
KDNDG-00405 hatası aldık. Bu hatanın kimi zaman nedeni asm_diskstring parametresinde disk path’imizin doğru set edilmemesinden kaynaklanıyor olabilir. Önce aşağıdaki komutla bunu update edelim (aslında asm_diskstring initial parametresindeki değeri kontrol ettiğimde bu parametrenin doğru olduğunu görmüştüm ama bu tarz bir case’ e denk gelirseniz aklınız da olsun diye buraya eklemek istedim);
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[oragrid@Node1 ~]$ kfod disks=all -------------------------------------------------------------------------------- Disk Size Path User Group ================================================================================ 1: 206489 Mb /dev/mapper/grd-asm1p1 oragrid oinstall 2: 206489 Mb /dev/mapper/grd-asm002p1 oragrid oinstall 3: 206489 Mb /dev/mapper/grd-asm003p1 oragrid oinstall 4: 206489 Mb /dev/mapper/grd-asm004p1 oragrid oinstall 5: 100827 Mb /dev/mapper/grd-asm005p1 oragrid oinstall 6: 50413 Mb /dev/mapper/grd-asm006p1 oragrid oinstall 7: 50413 Mb /dev/mapper/grd-asm007p1 oragrid oinstall -------------------------------------------------------------------------------- ORACLE_SID ORACLE_HOME ================================================================================ +ASM2 /u01/oragrid/grid/11gR2 +ASM1 /u01/oragrid/grid/11gR2 |
Şimdi sırası ile aşağıdaki adımları yapmaya çalışalım ;
Rename etmeye çalıştığımız diskgroup ‘ u dismount edelim (her bir node ‘ da);
1 2 |
SQL> alter diskgroup DATAXX_0000 dismount force; Diskgroup altered. |
Dismount olduğundan aşağıdaki komutla emin olalım ;
1 2 3 4 5 |
[oragrid@Node1 ~]$ asmcmd lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 100827 100497 0 100497 0 N ARCH1/ MOUNTED EXTERN N 512 4096 1048576 50413 50318 0 50318 0 N REDO1/ MOUNTED EXTERN N 512 4096 1048576 50413 50318 0 50318 0 N REDO2/ |
Tekrar deniyelim ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
[oragrid@Node1 ~]$ renamedg dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring='/dev/mapper/grd-asm1p1' verbose=true</strong> NOTE: No asm libraries found in the system Parsing parameters.. Parameters in effect: Old DG name : DATAXX_0000 New DG name : DATA1 Phases : Phase 1 Phase 2 Discovery str : /dev/mapper/grd-asm1p1 Clean : TRUE Raw only : TRUE renamedg operation: dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring=/dev/mapper/grd-asm1p1 verbose=true Executing phase 1 Discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking for hearbeat... Re-discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking if the diskgroup is mounted or used by CSS Checking disk number:0 <strong>KFNDG-00405: file not found; arguments: [DATAXX_0000] Terminating kgfd context 0x7fb09e97b0a0 |
Aynı hatayı almaya devam ediyoruz. Bu diskgroup içerisinde neler var diye kontrol edelim;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
column "Alias Name" format A30 column "Disk Group" format A15 select a.name "Alias Name", b.name "Disk Group" from v$asm_alias a, v$ASM_DISKGROUP b where a.group_number=b.group_number and b.name = 'DATAXX_0000' Alias Name Disk Group ------------------------------ --------------- test01-cluster DATAXX_0000 ASMPARAMETERFILE DATAXX_0000 REGISTRY.253.879679207 DATAXX_0000 OCRFILE DATAXX_0000 REGISTRY.255.879679215 DATAXX_0000 RACTEST DATAXX_0000 DATAFILE DATAXX_0000 SYSTEM.256.879759063 DATAXX_0000 SYSAUX.257.879759063 DATAXX_0000 UNDOTBS1.258.879759063 DATAXX_0000 USERS.259.879759063 DATAXX_0000 UNDOTBS2.264.879759177 DATAXX_0000 CONTROLFILE DATAXX_0000 Current.260.879759141 DATAXX_0000 ONLINELOG DATAXX_0000 group_1.261.879759145 DATAXX_0000 group_2.262.879759145 DATAXX_0000 group_3.265.879759211 DATAXX_0000 group_4.266.879759211 DATAXX_0000 TEMPFILE DATAXX_0000 TEMP.263.879759161 DATAXX_0000 PARAMETERFILE DATAXX_0000 spfile.267.879759213 DATAXX_0000 spfileRACTEST.ora DATAXX_0000 24 rows selected. |
Problemin kaynağını ile ilgili bir tespitimiz daha var, rename etmeye çalıştığımız disk group’ u içerisinde asmparameter file’ in olmaması gerekiyor. Şimdi bunu farklı bir diskgroup altına taşıyarak rename işlemini tekrar deniyelim ;
Şu anda spfile ‘ in full path’ ini görmek için ;
1 2 3 4 5 |
SQL> show parameter spfile; NAME TYPE VALUE -------------------------- ----------- ------------------------------ spfile string +DATAXX_0000/test01-cluster/asmparameterfile/registry.253.879679207 |
Yeni bir initfile oluşturup bundan bir spfile oluşturalım ;
1 2 3 4 5 |
SQL> create pfile='/u01/oragrid/grid/11gR2/dbs/initASM_move.ora' from spfile; File created. SQL> create spfile='+DATA2' from pfile='/u01/oragrid/grid/11gR2/dbs/initASM_move.ora'; File created. |
Asmcmd üzerinden yeni file’ i görebildiğimizi teyit edelim ;
1 2 3 4 5 6 |
[oragrid@Node2 dbs]$ asmcmd ASMCMD> cd +DATA2/test01-cluster/ASMPARAMETERFILE ASMCMD>pwd +DATA2/test01-cluster/ASMPARAMETERFILE ASMCMD> ls REGISTRY.253.880638769 |
Spfile’ i taşımış olduk şimdi cluster servisisi restart edelim ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
[oragrid@Node2 dbs]$ [oragrid@Node1 ~]$ sudo /u01/oragrid/grid/11gR2/bin/crsctl stop cluster -all CRS-2673: Attempting to stop 'ora.crsd' on 'Node1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'Node1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'Node1' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'Node1' CRS-2673: Attempting to stop 'ora.DATA2.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.DATA3.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.DATA4.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.registry.acfs' on 'Node1' CRS-2673: Attempting to stop 'ora.RACTEST.db' on 'Node1' CRS-2673: Attempting to stop 'ora.crsd' on 'Node2' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'Node2' CRS-2673: Attempting to stop 'ora.cvu' on 'Node2' CRS-2673: Attempting to stop 'ora.oc4j' on 'Node2' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'Node2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'Node2' CRS-2673: Attempting to stop 'ora.DATA2.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.DATA3.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.DATA4.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.registry.acfs' on 'Node2' CRS-2673: Attempting to stop 'ora.RACTEST.db' on 'Node2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'Node2' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'Node1' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.Node1.vip' on 'Node1' CRS-2677: Stop of 'ora.cvu' on 'Node2' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'Node2' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.Node2.vip' on 'Node2' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'Node2' CRS-2677: Stop of 'ora.DATA4.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.DATA4.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.DATA3.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.DATA3.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.registry.acfs' on 'Node2' succeeded CRS-2677: Stop of 'ora.registry.acfs' on 'Node1' succeeded CRS-2677: Stop of 'ora.RACTEST.db' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.ARCH1.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.DATAXX_0000.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.REDO1.dg' on 'Node2' CRS-2673: Attempting to stop 'ora.REDO2.dg' on 'Node2' CRS-2677: Stop of 'ora.RACTEST.db' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.ARCH1.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.DATAXX_0000.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.REDO1.dg' on 'Node1' CRS-2673: Attempting to stop 'ora.REDO2.dg' on 'Node1' CRS-2677: Stop of 'ora.ARCH1.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.ARCH1.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.scan1.vip' on 'Node1' succeeded CRS-2677: Stop of 'ora.REDO1.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.REDO1.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.REDO2.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.REDO2.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.Node1.vip' on 'Node1' succeeded CRS-2677: Stop of 'ora.scan3.vip' on 'Node2' succeeded CRS-2677: Stop of 'ora.Node2.vip' on 'Node2' succeeded CRS-2677: Stop of 'ora.scan2.vip' on 'Node2' succeeded CRS-2677: Stop of 'ora.oc4j' on 'Node2' succeeded CRS-2677: Stop of 'ora.DATAXX_0000.dg' on 'Node2' succeeded CRS-2677: Stop of 'ora.DATAXX_0000.dg' on 'Node1' succeeded CRS-2677: Stop of 'ora.DATA2.dg' on 'Node1' succeeded CRS-2679: Attempting to clean 'ora.DATA2.dg' on 'Node1' CRS-2681: Clean of 'ora.DATA2.dg' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'Node1' CRS-2677: Stop of 'ora.DATA2.dg' on 'Node2' succeeded CRS-2679: Attempting to clean 'ora.DATA2.dg' on 'Node2' CRS-2681: Clean of 'ora.DATA2.dg' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'Node2' CRS-2677: Stop of 'ora.asm' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'Node1' CRS-2677: Stop of 'ora.asm' on 'Node2' succeeded CRS-2677: Stop of 'ora.ons' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'Node1' CRS-2677: Stop of 'ora.net1.network' on 'Node1' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'Node1' has completed CRS-2673: Attempting to stop 'ora.ons' on 'Node2' CRS-2677: Stop of 'ora.ons' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'Node2' CRS-2677: Stop of 'ora.net1.network' on 'Node2' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'Node2' has completed CRS-2677: Stop of 'ora.crsd' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'Node1' CRS-2673: Attempting to stop 'ora.evmd' on 'Node1' CRS-2673: Attempting to stop 'ora.asm' on 'Node1' CRS-2677: Stop of 'ora.crsd' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'Node2' CRS-2673: Attempting to stop 'ora.evmd' on 'Node2' CRS-2673: Attempting to stop 'ora.asm' on 'Node2' CRS-2677: Stop of 'ora.evmd' on 'Node1' succeeded CRS-2677: Stop of 'ora.evmd' on 'Node2' succeeded CRS-2677: Stop of 'ora.ctssd' on 'Node2' succeeded CRS-2677: Stop of 'ora.ctssd' on 'Node1' succeeded CRS-2677: Stop of 'ora.asm' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'Node1' CRS-2677: Stop of 'ora.asm' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'Node2' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'Node1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'Node2' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'Node2' CRS-2677: Stop of 'ora.cssd' on 'Node1' succeeded CRS-2677: Stop of 'ora.cssd' on 'Node2' succeeded [oragrid@Node1 ~]$ sudo /u01/oragrid/grid/11gR2/bin/crsctl stop has CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'Node1' CRS-2673: Attempting to stop 'ora.crf' on 'Node1' CRS-2673: Attempting to stop 'ora.mdnsd' on 'Node1' CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'Node1' CRS-2677: Stop of 'ora.mdnsd' on 'Node1' succeeded CRS-2677: Stop of 'ora.crf' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'Node1' CRS-2677: Stop of 'ora.drivers.acfs' on 'Node1' succeeded CRS-2677: Stop of 'ora.gipcd' on 'Node1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'Node1' CRS-2677: Stop of 'ora.gpnpd' on 'Node1' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'Node1' has completed CRS-4133: Oracle High Availability Services has been stopped. -- start [oragrid@Node1 ~]$ sudo /u01/oragrid/grid/11gR2/bin/crsctl start has CRS-4123: Oracle High Availability Services has been started. [oragrid@Node1 ~]$ sudo /u01/oragrid/grid/11gR2/bin/crsctl start cluster -all CRS-5702: Resource 'ora.crsd' is already running on 'Node1' CRS-5702: Resource 'ora.evmd' is already running on 'Node1' |
Spfile ‘ in şu anki yeri ;
1 2 3 4 5 6 7 8 |
SQL> sho parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +DATA2/test01-cluster/as mparameterfile/registry.253.88 0638769 SQL> |
Eski parametre dosyasını artık silebiliriz ;
1 2 |
[oragrid@Node2 ~]$ asmcmd rm +DATAXX_0000/test01-cluster/asmparameterfile/registry.253.879679207 [oragrid@Node2 ~]$ |
Son olarak rename edilecek olan diskGROUP içerisinde OCR ve Voting disklerinin de olmaması gerekiyor. Ocr file’ ini görmek için ;
1 2 3 4 5 6 7 |
[oragrid@Node1 ~]$ ocrconfig -showbackup Node1 2015/05/28 07:04:32 /u01/oragrid/grid/11gR2/cdata/test01-cluster/backup00.ocr Node1 2015/05/28 03:04:27 /u01/oragrid/grid/11gR2/cdata/test01-cluster/backup01.ocr Node1 2015/05/27 23:04:25 /u01/oragrid/grid/11gR2/cdata/test01-cluster/backup02.ocr Node2 2015/05/27 02:43:02 /u01/oragrid/grid/11gR2/cdata/test01-cluster/day.ocr Node2 2015/05/21 03:59:08 /u01/oragrid/grid/11gR2/cdata/test01-cluster/week.ocr PROT-25: Manual backups for the Oracle Cluster Registry are not available |
Voting disklerinin path’ ini görmek için ;
1 2 3 4 5 |
[oragrid@Node1 ~]$ crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 73371e831ac84fe1bf575b5daed9e027 (/dev/mapper/grd-asm1p1) [DATAXX_0000] Located 1 voting disk(s). |
Voting disklerimiz ismini rename etmek istediğimiz diskgroup’ da olduğu için bunlarıda burdan taşımamız gerekiyor;
1 2 3 4 5 6 |
[oragrid@Node1 ~]$ crsctl replace votedisk +DATA2 Successful addition of voting disk a61eef84ea694fc0bfe81659d9052cc1. Successful deletion of voting disk 73371e831ac84fe1bf575b5daed9e027. Successfully replaced voting disk group with +DATA2. CRS-4266: Voting file(s) successfully replaced [oragrid@Node1 ~]$ |
Tekrar kontrol edelim ;
1 2 3 4 5 6 |
[oragrid@Node1 ~]$ crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE a61eef84ea694fc0bfe81659d9052cc1 (/dev/mapper/grd-asm002p1) [DATA2] Located 1 voting disk(s). [oragrid@Node1 ~]$ |
Rename işlemini tekrar deniyoruz;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
[oragrid@Node1 ~]$ renamedg dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring='/dev/mapper/grd-asm1p1' verbose=true NOTE: No asm libraries found in the system Parsing parameters.. Parameters in effect: Old DG name : DATAXX_0000 New DG name : DATA1 Phases : Phase 1 Phase 2 Discovery str : /dev/mapper/grd-asm1p1 Clean : TRUE Raw only : TRUE renamedg operation: dgname=DATAXX_0000 newdgname=DATA1 asm_diskstring=/dev/mapper/grd-asm1p1 verbose=true Executing phase 1 Discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking for hearbeat... Re-discovering the group Performing discovery with string:/dev/mapper/grd-asm1p1 Identified disk UFS:/dev/mapper/grd-asm1p1 with disk number:0 and timestamp (33019339 1334794240) Checking if the diskgroup is mounted or used by CSS Checking disk number:0 Generating configuration file.. Completed phase 1 Executing phase 2 Looking for /dev/mapper/grd-asm1p1 Modifying the header Completed phase 2 Terminating kgfd context 0x7fc2363780a0 |
Asmcmd ile diskleri tekrar kontrol ettiğimiz de ilgili diskgroup’ unun isminin değiştiğini görüyor olmamız gerekiyor;
ASMCMD> ls
ARCH1/
DATA1/
DATA2/
DATA3/
DATA4/
REDO1/
REDO2/
ASMCMD>
Bi sürü hatadan sonra diskgroup’ umuzu rename etmeyi başardık.Buraya kadar herşey doğru gözüküyor. Şimdi database’ imizi start etmeye çalıştığımız da ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[oragrid@Node1 ~]$ srvctl start database -d RACTEST PRCR-1079 : Failed to start resource ora.RACTEST.db CRS-5017: The resource action "ora.DATAXX_0000.dg start" encountered the following error: ORA-15032: not all alterations performed ORA-15017: diskgroup "DATAXX_0000" cannot be mounted ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATAXX_0000" . For details refer to "(:CLSN00107:)" in "/u01/oragrid/grid/11gR2/log/Node2/agent/crsd/oraagent_oragrid/oraagent_oragrid.log". CRS-2674: Start of 'ora.DATAXX_0000.dg' on 'Node2' failed CRS-2632: There are no more servers to try to place resource 'ora.RACTEST.db' on that would satisfy its placement policy CRS-5017: The resource action "ora.DATAXX_0000.dg start" encountered the following error: ORA-15032: not all alterations performed ORA-15017: diskgroup "DATAXX_0000" cannot be mounted ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATAXX_0000" . For details refer to "(:CLSN00107:)" in "/u01/oragrid/grid/11gR2/log/Node1/agent/crsd/oraagent_oragrid/oraagent_oragrid.log". CRS-2674: Start of 'ora.DATAXX_0000.dg' on 'Node1' failed |
Hatasını alırız. Çünkü database cluster servisimiz henüz hala eski isimdeki disk group’ unu arıyor ve bulamadığı içinde hata veriyor. Database ‘ in config’ lerine baktığımız dada bu durumu gözlemleyebiliriz ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[oragrid@Node1 ~]$ srvctl config database -d RACTEST Database unique name: RACTEST Database name: RACTEST Oracle home: /u01/sq/ora_1/db/11.2.0.4 Oracle user: oracle Spfile: +DATA2/RACTEST/spfileRACTEST.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: RACTEST Database instances: RACTEST1,RACTEST2 Disk Groups: REDO2,ARCH1,REDO1,DATAXX_0000,DATA2 Mount point paths: Services: Type: RAC Database is administrator managed [oragrid@Node1 ~]$ |
Şimdi cluster’ da da bu isim değişikliğini yapmaya çalışalım ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
[oragrid@Node1 ~]$ sudo /u01/oragrid/grid/11gR2/bin/srvctl modify database -d RACTEST -a "REDO2,ARCH1,REDO1,DATA1,DATA2" [oragrid@Node1 ~]$ [oragrid@Node1 ~]$ srvctl config database -d RACTEST Database unique name: RACTEST Database name: RACTEST Oracle home: /u01/sq/ora_1/db/11.2.0.4 Oracle user: oracle Spfile: +DATA2/RACTEST/spfileRACTEST.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: RACTEST Database instances: RACTEST1,RACTEST2 Disk Groups: REDO2,ARCH1,REDO1,DATA1,DATA2 Mount point paths: Services: Type: RAC Database is administrator managed [oragrid@Node1 ~]$ |
Database ‘i açmaya çalıştığımız da alert logda ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
MARK started with pid=38, OS id=31222 NOTE: MARK has subscribed Fri May 29 16:02:51 2015 ALTER SYSTEM SET local_listener=' (ADDRESS=(PROTOCOL=TCP)(HOST=146.8.7.133)(PORT=1521))' SCOPE=MEMORY SID='RACTEST1'; NOTE: Loaded library: System SUCCESS: diskgroup ARCH1 was mounted ORA-00210: cannot open the specified control file ORA-00202: control file: '+DATAXX_0000/RACTEST/controlfile/current.260.879759141' ORA-17503: ksfdopn:2 Failed to open file +DATAXX_0000/RACTEST/controlfile/current.260.879759141 ORA-15001: diskgroup "DATAXX_0000" does not exist or is not mounted ORA-15077: could not locate ASM instance serving a required diskgroup ORA-205 signalled during: ALTER DATABASE MOUNT... NOTE: dependency between database RACTEST and diskgroup resource ora.ARCH1.dg is established Fri May 29 16:03:51 2015 Decreasing number of real time LMS from 3 to 0 Fri May 29 16:11:58 2015 SUCCESS: diskgroup DATA2 was mounted ALTER SYSTEM SET control_files='+DATA1/RACTEST/controlfile/current.260.879759141','+ARCH1/RACTEST/controlfile/current.256.879759141' SCOPE=SPFILE SID='*'; Fri May 29 16:11:58 2015 NOTE: dependency between database RACTEST and diskgroup resource ora.DATA2.dg is established Shutting down instance (immediate) |
Rename ettiğimiz diskde controlfile’ imiz olduğu için ve diski de o isimde aradığı için db’ i açamıyoruz, parametreyi alter ederek yeni diski gösterelim ;
1 2 3 4 5 6 7 8 9 10 11 12 13 |
SQL> startup nomount ORACLE instance started. Total System Global Area 5227814912 bytes Fixed Size 2262368 bytes Variable Size 2936015520 bytes Database Buffers 2264924160 bytes Redo Buffers 24612864 bytes SQL> SQL> alter system set control_files='+DATA1/RACTEST/controlfile/current.260.879759141','+ARCH1/RACTEST/controlfile/current.256.879759141' scope=spfile sid='*'; System altered. SQL> alter database mount Database altered. |
Maalesef henüz işimiz bitmedi Aynı controlfile ‘ de olduğu buradaki tüm dbf ve redologlar içinde bu değişikliği yapamız lazım. Aksi takdirde ;
1 2 3 4 5 6 |
SQL> alter database open ; alter database open * ERROR at line 1: ORA-01157: cannot identify/lock data file 1 - see DBWR trace file ORA-01110: data file 1: '+DATAXX_0000/RACTEST/datafile/system.256.879759063' |
Hatasını alırız. Şimdi gerekli düzeltmelerimzi yapalım ;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
select file#, name from v$datafile ; FILE# NAME ---- ------------------------------------------------ 1 +DATAXX_0000/RACTEST/datafile/system.256.879759063 2 +DATAXX_0000/RACTEST/datafile/sysaux.257.879759063 3 +DATAXX_0000/RACTEST/datafile/undotbs1.258.879759063 4 +DATAXX_0000/RACTEST/datafile/users.259.879759063 5 +DATAXX_0000/RACTEST/datafile/undotbs2.264.879759177 6 +DATA2/RACTEST/datafile/data01.258.880734409 SELECT V2.GROUP#, v2. THREAD#, V1.MEMBER FROM V$LOGFILE V1, V$LOG V2 WHERE V1.GROUP# = V2.GROUP# GROUP# THREAD# MEMBER 1 1 +ARCH1/RACTEST/onlinelog/group_1.257.879759145 1 1 +DATAXX_0000/RACTEST/onlinelog/group_1.261.879759145 2 1 +ARCH1/RACTEST/onlinelog/group_2.258.879759145 2 1 +DATAXX_0000/RACTEST/onlinelog/group_2.262.879759145 3 2 +ARCH1/RACTEST/onlinelog/group_3.259.879759211 3 2 +DATAXX_0000/RACTEST/onlinelog/group_3.265.879759211 4 2 +ARCH1/RACTEST/onlinelog/group_4.260.879759213 4 2 +DATAXX_0000/RACTEST/onlinelog/group_4.266.879759211 |
+DATAXX_0000 diskgroup’ una olan tüm file’ leri rename ediyoruz;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/datafile/system.256.879759063' TO '+DATA1/RACTEST/datafile/system.256.879759063'; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/datafile/sysaux.257.879759063' to '+DATA1/RACTEST/datafile/sysaux.257.879759063' ; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/datafile/undotbs1.258.879759063' to '+DATA1/RACTEST/datafile/undotbs1.258.879759063' ; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/datafile/users.259.879759063' to '+DATA1/RACTEST/datafile/users.259.879759063'; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/datafile/undotbs2.264.879759177' to '+DATA1/RACTEST/datafile/undotbs2.264.879759177'; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/onlinelog/group_1.261.879759145' to '+DATA1/RACTEST/onlinelog/group_1.261.879759145' ; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/onlinelog/group_2.262.879759145' to '+DATA1/RACTEST/onlinelog/group_2.262.879759145' ; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/onlinelog/group_3.265.879759211' to '+DATA1/RACTEST/onlinelog/group_3.265.879759211' ; Database altered. SQL> ALTER DATABASE RENAME FILE '+DATAXX_0000/RACTEST/onlinelog/group_4.266.879759211' to '+DATA1/RACTEST/onlinelog/group_4.266.879759211' ; Database altered. |
Şimdi tekrar açmaya çalışıyoruz ;
1 2 |
SQL> alter database open ; Database altered. |
Bir diskgroup’ u rename etmek isterken bunların dışında başka ne ile karşılabilirsiniz bilemedim. Sanırım bayağa kapsamlı bir test oldu 🙂