Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Change votingdisk and OCR to other asm disk groups

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. View ocr and votedisk

[oracle:/home/oracle:RACTEST1] ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3104

Available space (kbytes): 259016

ID: 44728649

Device/File Name: + OCR1

Device/File integrity check succeeded

Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user

[oracle:/home/oracle:RACTEST1] crsctl query css votedisk

* # # STATE File Universal Id File Name Disk group

ONLINE a5ef8885d1564f99bf0e0d77286c3b1f (/ dev/oracleasm/disks/OCR11) [OCR1]

Located 1 voting disk (s).

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 2 OCR1 512 1048576 MOUNTED EXTERN Y

two。 Create a new ASM diskgroup (asmca graphical interface creation)

Create diskgroup OCR normal redundancy disk'/ dev/oracleasm/disks/OCR01','/dev/oracleasm/disks/OCR02','/dev/oracleasm/disks/OCR03' attribute 'compatible.asm'='11.2'

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 2 OCR1 512 1048576 MOUNTED EXTERN Y 3 OCR 512 1048576 MOUNTED NORMAL N

3.votedisk changed from + OCR1 to + OCR

[oracle:/home/oracle:RACTEST1] crsctl replace votedisk + OCR

Successful addition of voting disk 9b4ac868901f4f89bf191e59baa3442b.

Successful addition of voting disk 2c2eff1ca2ad4f7bbfcdf8fc913dcc45.

Successful addition of voting disk 652d503ff1154fd6bfdfe3273a12d529.

Successful deletion of voting disk a5ef8885d1564f99bf0e0d77286c3b1f.

Successfully replaced voting disk group with + OCR.

CRS-4266: Voting file (s) successfully replaced

[oracle:/home/oracle:RACTEST1] crsctl query css votedisk

* # # STATE File Universal Id File Name Disk group

ONLINE 9b4ac868901f4f89bf191e59baa3442b (/ dev/oracleasm/disks/OCR01) [OCR] ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/ dev/oracleasm/disks/OCR02) [OCR] ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/ dev/oracleasm/disks/OCR03) [OCR]

Located 3 voting disk (s).

4. Change ocr

[root@ractest1 disks] # ocrconfig-add + OCR

[root@ractest1 disks] # ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3108

Available space (kbytes): 259012

ID: 44728649

Device/File Name: + OCR1

Device/File integrity check succeeded

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded

[root@ractest1 disks] # ocrconfig-delete + OCR1

[root@ractest1 disks] # ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3108

Available space (kbytes): 259012

ID: 44728649

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File not configured Cluster registry integrity check succeeded Logical corruption check succeeded

5. View the location where the asm parameter file is stored and modify it to + OCR

SQL > show parameter spfile

NAME TYPE VALUE

Spfile string + OCR1/ractest-cluster/asmparam

Eterfile/registry.253.10297677

thirteen

SQL > create pfile='/oracle/app/product/grid/dbs/pfile_ASM1.ora' from spfile

File created.

SQL > create spfile='+OCR' from pfile='/oracle/app/product/grid/dbs/pfile_ASM1.ora'

File created.

SQL > show parameter spfile

NAME TYPE VALUE

Spfile string + OCR1/ractest-cluster/asmparam

Eterfile/registry.253.10297677

thirteen

6. Restart crs on one node

[root@ractest1 disks] # crsctl stop crs

[root@ractest1 disks] # crsctl start crs

[root@ractest1 disks] # su-oracle

[oracle:/home/oracle:RACTEST1] srvctl start instance-d RACTEST-n ractest1

[oracle:/home/oracle:RACTEST1] crs

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

*-

Ora.DATA.dg

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.LISTENER.lsnr

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.OCR.dg

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.OCR1.dg

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.asm

ONLINE ONLINE ractest1 Started

ONLINE ONLINE ractest2 Started

Ora.gsd

OFFLINE OFFLINE ractest1

OFFLINE OFFLINE ractest2

Ora.net1.network

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.ons

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2

Ora.registry.acfs

ONLINE ONLINE ractest1

ONLINE ONLINE ractest2Cluster Resources

Ora.cvu

1 ONLINE ONLINE ractest2

Ora.oc4j

1 OFFLINE OFFLINE

Ora.ractest.db

1 ONLINE ONLINE ractest1 Open

2 ONLINE ONLINE ractest2 Open

Ora.ractest1.vip

1 ONLINE ONLINE ractest1

Ora.ractest2.vip

1 ONLINE ONLINE ractest2

Ora.testdb.db

1 ONLINE OFFLINE Instance Shutdown

SQL > show parameter spfile

NAME TYPE VALUE

Spfile string + OCR/ractest-cluster/asmparame

Terfile/registry.253.102983977

five

7.2Node restart crs

[root@ractest2 ~] # crsctl stop crs

[root@ractest2 ~] # crsctl start crs

[root@ractest2 ~] # su-oracle

[oracle:/home/oracle:RACTEST2] srvctl start instance-d RACTEST-n ractest2

SQL > show parameter spfile

NAME TYPE VALUE

Spfile string + OCR/ractest-cluster/asmparame

Terfile/registry.253.102983977

five

8. Delete + OCR1

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 2 OCR1 512 1048576 MOUNTED EXTERN N 3 OCR 512 1048576 MOUNTED NORMAL Y

SQL > drop diskgroup OCR1 including contents

Drop diskgroup OCR1 including contents

*

ERROR at line 1:

ORA-15039: diskgroup not dropped

ORA-15073: diskgroup OCR1 is mounted by another ASM instance

SQL > alter diskgroup OCR1 dismount

Diskgroup altered.

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 0 OCR1 0 0 DISMOUNTED N 3 OCR 512 1048576 MOUNTED NORMAL Y

SQL > drop diskgroup OCR1 including contents

Drop diskgroup OCR1 including contents

*

ERROR at line 1:

ORA-15039: diskgroup not dropped

ORA-15001: diskgroup "OCR1" does not exist or is not mounted

SQL > alter diskgroup OCR1 mount

Diskgroup altered.

SQL > drop diskgroup OCR1 including contents

Diskgroup dropped.

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 3 OCR 512 1048576 MOUNTED NORMAL Y

2 Node View:

SQL > select GROUP_NUMBER,NAME,SECTOR_SIZE,ALLOCATION_UNIT_SIZE,STATE,TYPE,VOTING_FILES from v$asm_diskgroup

GROUP_NUMBER NAME SECTOR_SIZE ALLOCATION_UNIT_SIZE STATE TYPE VOT

1 DATA 512 1048576 MOUNTED EXTERN N 3 OCR 512 1048576 MOUNTED NORMAL Y

9. Finally, check both nodes.

[oracle:/home/oracle:+ASM1] crsctl query css votedisk

* # # STATE File Universal Id File Name Disk group

ONLINE 9b4ac868901f4f89bf191e59baa3442b (/ dev/oracleasm/disks/OCR01) [OCR] ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/ dev/oracleasm/disks/OCR02) [OCR]

ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/ dev/oracleasm/disks/OCR03) [OCR]

Located 3 voting disk (s).

[oracle:/home/oracle:+ASM1] ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3088

Available space (kbytes): 259032

ID: 44728649

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user

[oracle:/home/oracle:+ASM2] crsctl query css votedisk

* # # STATE File Universal Id File Name Disk group

ONLINE 9b4ac868901f4f89bf191e59baa3442b (/ dev/oracleasm/disks/OCR01) [OCR] ONLINE 2c2eff1ca2ad4f7bbfcdf8fc913dcc45 (/ dev/oracleasm/disks/OCR02) [OCR]

ONLINE 652d503ff1154fd6bfdfe3273a12d529 (/ dev/oracleasm/disks/OCR03) [OCR]

Located 3 voting disk (s).

[oracle:/home/oracle:+ASM2] ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3088

Available space (kbytes): 259032

ID: 44728649

Device/File Name: + OCR

Device/File integrity check succeeded

Device/File not configured Cluster registry integrity check succeeded Logical corruption check bypassed due to non-privileged user

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report