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

11gR2_RAC existing disk group add disk

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

Share

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

1. Add two hard disk hdisk17,hdisk18 to the AIX system and configure them.

1) assign pvid to disk

The name of the same hard disk in an external storage device may be different on different nodes. The name of the same hard disk in node 1 may be hdisk4, and the name in node 2 may be hdisk5. Although the ASM instance can correctly identify such a hard disk, it may be ambiguous to the administrator. In any case, an immutable attribute of this hard drive is PVID, which is the same under node one or node two. The PVID of the hard disk can be generated with the following command

Chdev-l hdisk17-a pv=yes

Chdev-l hdisk18-a pv=yes

2) modify disk permissions

This project uses ASM, so you need to specify the disks to be included in ASM disks and ensure that grid users have write access to these disks.

Modify disk group

Chown grid:asmadmin / dev/rhdisk17

Chown grid:asmadmin / dev/rhdisk18

Modify disk permissions

Chmod 660 / dev/rhdisk17

Chmod 660 / dev/rhdisk18

3) check disk properties

Some models of storage devices have reserve_lock or reserve_policy attributes, which prevent multiple nodes from reading and writing to storage devices in parallel, so their properties should be modified before installing cluster software.

Lsattr-E-l hdisk17 | grep reserve_

Lsattr-E-l hdisk18 | grep reserve_

4) set the disk property to reserve_lock=no or reserve_policy=no_reserve

Chdev-l hdisk17-a reserve_policy=no_reserve

Chdev-l hdisk18-a reserve_policy=no_reserve

5) clear disk pvid

With PVID, you can compare and confirm the same hard disk in different nodes, but you should clear the PVID on each node before installing the cluster software, otherwise errors may occur during installation.

Chdev-l hdisk17-a pv=clear

Chdev-l hdisk18-a pv=clear

2. Add disks to the existing disk group.

# su-grid

$sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Fri May 5 10:44:30 2017

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit Production

With the Real Application Clusters and Automatic Storage Management options

SQL > select GROUP_NUMBER,NAME,TYPE,TOTAL_MB,FREE_MB from v$asm_diskgroup

GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB

1 CRS NORMAL 6144 5218

2 DATA EXTERN 6144000 6141937

SQL > select GROUP_NUMBER,DISK_NUMBER,NAME,FAILGROUP,FAILGROUP,PATH,STATE from v$asm_disk

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE

2 0 DATA_0000 DATA_0000 DATA_0000 / dev/rhdisk10 NORMAL

2 1 DATA_0001 DATA_0001 DATA_0001 / dev/rhdisk11 NORMAL

2 2 DATA_0002 DATA_0002 DATA_0002 / dev/rhdisk12 NORMAL

2 3 DATA_0003 DATA_0003 DATA_0003 / dev/rhdisk13 NORMAL

2 4 DATA_0004 DATA_0004 DATA_0004 / dev/rhdisk14 NORMAL

2 5 DATA_0005 DATA_0005 DATA_0005 / dev/rhdisk15 NORMAL

2 6 DATA_0006 DATA_0006 DATA_0006 / dev/rhdisk16 NORMAL

1 0 CRS_0000 CRS_0000 CRS_0000 / dev/rhdisk2 NORMAL

1 1 CRS_0001 CRS_0001 CRS_0001 / dev/rhdisk3 NORMAL

1 2 CRS_0002 CRS_0002 CRS_0002 / dev/rhdisk4 NORMAL

2 7 DATA_0007 DATA_0007 DATA_0007 / dev/rhdisk5 NORMAL

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE

2 8 DATA_0008 DATA_0008 DATA_0008 / dev/rhdisk6 NORMAL

2 9 DATA_0009 DATA_0009 DATA_0009 / dev/rhdisk7 NORMAL

2 10 DATA_0010 DATA_0010 DATA_0010 / dev/rhdisk8 NORMAL

2 11 DATA_0011 DATA_0011 DATA_0011 / dev/rhdisk9 NORMAL NORMAL

17 rows selected.

SQL > alter diskgroup DATA add disk'/ dev/rhdisk17'

Diskgroup altered.

SQL > alter diskgroup DATA add disk'/ dev/rhdisk18'

Diskgroup altered.

SQL > select GROUP_NUMBER,NAME,TYPE,TOTAL_MB,FREE_MB from v$asm_diskgroup

GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB

1 CRS NORMAL 6144 5218

2 DATA EXTERN 7168000 7165915

SQL > select GROUP_NUMBER,DISK_NUMBER,NAME,FAILGROUP,FAILGROUP,PATH,STATE from v$asm_disk

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE

2 0 DATA_0000 DATA_0000 DATA_0000 / dev/rhdisk10 NORMAL

2 1 DATA_0001 DATA_0001 DATA_0001 / dev/rhdisk11 NORMAL

2 2 DATA_0002 DATA_0002 DATA_0002 / dev/rhdisk12 NORMAL

2 3 DATA_0003 DATA_0003 DATA_0003 / dev/rhdisk13 NORMAL

2 4 DATA_0004 DATA_0004 DATA_0004 / dev/rhdisk14 NORMAL

2 5 DATA_0005 DATA_0005 DATA_0005 / dev/rhdisk15 NORMAL

2 6 DATA_0006 DATA_0006 DATA_0006 / dev/rhdisk16 NORMAL

1 0 CRS_0000 CRS_0000 CRS_0000 / dev/rhdisk2 NORMAL

1 1 CRS_0001 CRS_0001 CRS_0001 / dev/rhdisk3 NORMAL

1 2 CRS_0002 CRS_0002 CRS_0002 / dev/rhdisk4 NORMAL

2 7 DATA_0007 DATA_0007 DATA_0007 / dev/rhdisk5 NORMAL

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP FAILGROUP PATH STATE

2 8 DATA_0008 DATA_0008 DATA_0008 / dev/rhdisk6 NORMAL

2 9 DATA_0009 DATA_0009 DATA_0009 / dev/rhdisk7 NORMAL

2 10 DATA_0010 DATA_0010 DATA_0010 / dev/rhdisk8 NORMAL

2 11 DATA_0011 DATA_0011 DATA_0011 / dev/rhdisk9 NORMAL

2 12 DATA_0012 DATA_0012 DATA_0012 / dev/rhdisk17 NORMAL

2 13 DATA_0013 DATA_0013 DATA_0013 / dev/rhdisk18 NORMAL

17 rows selected.

After adding the disk, oracle automatically rebalances the rebalance operation, which can be viewed in the view (when the amount of data is large, the information can be found in the teacher's view).

SQL > select * from v$asm_operation

No nows selected

SQL >

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