Home > Oracle > 正文

数据库RAC 磁盘组磁盘调整

数据库RAC

磁盘组磁盘调整

2018年9月12

问题:

     因安装是规划问题,错误的将3块800G的lun划到了OCR磁盘组,而规划的5块10G的LUN则划分到了DATA磁盘组,现在DATA磁盘组空间即将不足,而存储上也没有多余的存储用来划给DATA磁盘组。

限制:

     数据库集群不停机

 

当前环境有三个磁盘组

1.ARCH   extern冗余

     含1块800G

2.DATA   extern冗余

     含5块10G、6块800G

3.OCR        normal

     含3块800G分属于3个failgroup

    

需求:

     DATA磁盘组和OCR磁盘组中磁盘规划问题,需要将DATA磁盘组中较小的磁盘替换掉OCR磁盘组中3块较大的800g的磁盘

大致操作:

1.从DATA磁盘组退出三块10G的磁盘

2.把3块10G的磁盘分别加入到OCR磁盘组的3个failgroup中。

3.把OCR磁盘组中3块800G的磁盘从OCR磁盘组中删除。

 

参考官方文档

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=167917034193957&id=1558007.1&_adf.ctrl-state=o565sliev_297

 

 

连接数据库主机

ssh 192.168.xx.xx

Connecting to 192.168.xx.xx:22...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.

 

Last login: Tue Jul 24 18:27:41 2018 from 192.168.xx.xx

检查ocr存放位置

[root@rac01 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

      Version                  :          3

      Total space (kbytes)     :     262120

      Used space (kbytes)      :       3100

      Available space (kbytes) :     259020

      ID                       : 1344662935

      Device/File Name         :       +OCR

                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

      Cluster registry integrity check succeeded

      Logical corruption check succeeded

 

检查votefile存放位置

[root@rac01 ~]# crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   7f134ec356a34f44bff06e30740f5a20 (/dev/asmdisk/asm-ocr01) [OCR]

 2. ONLINE   a9b5943bb0b84f6abffc2c91166a2e34 (/dev/asmdisk/asm-ocr02) [OCR]

 3. ONLINE   213d87ebffb04fb2bf0e98546a0e37fb (/dev/asmdisk/asm-ocr03) [OCR]

Located 3 voting disk(s).

手动备份ocr文件

[root@rac01 ~]# ocrconfig -manualbackup

 

rac02     2018/09/10 18:01:00     /u01/app/11.2.0/grid/cdata/xxrac/backup_20180910_180100.ocr

查看备份

[root@rac01 ~]# ocrconfig -showbackup

 

rac02     2018/09/10 16:37:00     /u01/app/11.2.0/grid/cdata/xxrac/backup00.ocr

rac02     2018/09/10 12:37:00     /u01/app/11.2.0/grid/cdata/xxrac/backup01.ocr

rac02     2018/09/10 08:37:00     /u01/app/11.2.0/grid/cdata/xxrac/backup02.ocr

rac02     2018/09/09 04:36:58     /u01/app/11.2.0/grid/cdata/xxrac/day.ocr

rac02     2018/08/29 20:36:44     /u01/app/11.2.0/grid/cdata/xxrac/week.ocr

rac01     2018/09/10 18:01:00     /u01/app/11.2.0/grid/cdata/xxrac/backup_20180910_180100.ocr

 

进入到grid用户

[root@rac01 ~]# su - grid

[grid@rac01 ~]$ echo $ORACLE_SID

+ASM1

[grid@rac01 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 10 18:02:15 2018

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> show parameter spfile;

 

NAME     TYPE      VALUE

--------- ----------- ------------------------------

spfile   string   +OCR/xxrac/asmparameterfile/registry.253.941675891

 

备份asm参数文件

SQL> create pfile='/tmp/asmpfile.bak' from spfile;

 

File created.

 

 

查询当前磁盘组情况

SQL> set lines 200 pages 1000

SQL> col name format a15;

col path format a25;

col failgroup format a20;

 

查询OCR磁盘组为3块800G磁盘,名字为OCR_0000/OCR_0001/OCR_0002

SQL> select dg.name,d.name,d.total_mb/1024, d.path, d.failgroup, d.failgroup_type from v$asm_diskgroup dg, v$asm_disk d where dg.group_number = d.group_number and dg.name = 'OCR' order by dg.name, d.failgroup, d.path;

NAME     NAME      SIZE_GB  PATH          FAILGROUP        FAILGRO

--------- ------------------ ---------------- ------------------ -------

OCR      OCR_0000 800 /dev/asmdisk/asm-ocr01    OCR_0000           REGULAR

OCR      OCR_0001 800 /dev/asmdisk/asm-ocr02    OCR_0001           REGULAR

OCR      OCR_0002 800 /dev/asmdisk/asm-ocr03    OCR_0002           REGULAR

 

查询DATA磁盘组有5块10G的磁盘,准备取前3块做替换,名字为DATA_0000/DATA_0001/DATA_0002

SQL> select dg.name,d.name,d.total_mb/1024, d.path, d.failgroup, d.failgroup_type from v$asm_diskgroup dg, v$asm_disk d where dg.group_number = d.group_number and dg.name = 'DATA' order by dg.name, d.failgroup, d.path;

NAME     NAME     SIZE_GB  PATH            FAILGROUP          FAILGRO

--------------- --------------- ------------------------- -------------------- -------

DATA     DATA_0000     10 /dev/asmdisk/asm-data01   DATA_0000           REGULAR

DATA     DATA_0001     10 /dev/asmdisk/asm-data02   DATA_0001           REGULAR

DATA     DATA_0002     10 /dev/asmdisk/asm-data03   DATA_0002           REGULAR

DATA     DATA_0003     10 /dev/asmdisk/asm-data04   DATA_0003           REGULAR

DATA     DATA_0004     10 /dev/asmdisk/asm-data05   DATA_0004           REGULAR

DATA     DATA_0005     800 /dev/asmdisk/asm-data06   DATA_0005           REGULAR

DATA     DATA_0006     800 /dev/asmdisk/asm-data07   DATA_0006           REGULAR

DATA     DATA_0007     800 /dev/asmdisk/asm-data08   DATA_0007           REGULAR

DATA     DATA_0008     800 /dev/asmdisk/asm-data09   DATA_0008           REGULAR

DATA     DATA_0009     800 /dev/asmdisk/asm-ocr04    DATA_0009          REGULAR

DATA     DATA_0010     800 /dev/asmdisk/asm-ocr05    DATA_0010          REGULAR

 

11 rows selected.

 

在DATA磁盘组删除掉准备替换的三块磁盘

SQL> ALTER DISKGROUP DATA DROP DISK 'DATA_0000','DATA_0001','DATA_0002';

 

Diskgroup altered.

 

查询删除情况

SQL> select * from gv$asm_operation;

 

   INST_ID GROUP_NUMBER OPERA STAT    POWER      ACTUAL      SOFAR   EST_WORK     EST_RATE EST_MINUTES ERROR_CODE

---------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------

      1         2 REBAL RUN       1        1   11  120921        1044   115

      2         2 REBAL WAIT      1

 

调整磁盘组reblance power级别,11为最快

SQL> alter diskgroup data rebalance power 11;

 

Diskgroup altered.

 

SQL> select * from gv$asm_operation;

 

   INST_ID GROUP_NUMBER OPERA STAT    POWER      ACTUAL      SOFAR   EST_WORK     EST_RATE EST_MINUTES ERROR_CODE

---------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------

      2         2 REBAL WAIT     11

      1         2 REBAL RUN      11       11  456  14786         3009     4

 

SQL> /

 

   INST_ID GROUP_NUMBER OPERA STAT    POWER      ACTUAL      SOFAR   EST_WORK     EST_RATE EST_MINUTES ERROR_CODE

---------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------

      2         2 REBAL WAIT     11

      1         2 REBAL RUN      11       11      14786  14786        0        0

 

 

待查询该视图,无返回值则表示3块磁盘已删除

SQL> select * from gv$asm_operation;

 

no rows selected

 

[root@rac01 ~]# ls -l /dev/asmdisk/

total 0

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data01 -> ../sdk

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data02 -> ../sdl

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data03 -> ../sdo

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data04 -> ../sdn

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data05 -> ../sdm

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data06 -> ../sdp

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data07 -> ../sdb

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data08 -> ../sdc

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data09 -> ../sdd

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-fra01 -> ../sde

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr01 -> ../sdf

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr02 -> ../sdg

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr03 -> ../sdh

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-ocr04 -> ../sdi

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-ocr05 -> ../sdj

 

用dd命令清空三块磁盘组的磁盘头信息,确认是asm-data01和asm-data02及asm-data03三块盘对应的盘符,千万不要写错

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdk bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.000933349 s, 2.2 MB/s

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdl bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.00099797 s, 2.1 MB/s

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdo bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.000144885 s, 14.1 MB/s

 

把三块清空过信息的磁盘添加到OCR磁盘组的三个failgroup

SQL> ALTER DISKGROUP OCR ADD FAILGROUP OCR_0000 DISK '/dev/asmdisk/asm-data01' FAILGROUP OCR_0001 DISK '/dev/asmdisk/asm-data02' FAILGROUP OCR_0002 DISK '/dev/asmdisk/asm-data03';

Diskgroup altered.

 

SQL> select * from gv$asm_operation;

 

no rows selected

查询新加的3块10g的盘已经加进来了

 

SQL> select dg.name,d.name,d.total_mb/1024, d.path, d.failgroup, d.failgroup_type from v$asm_diskgroup dg, v$asm_disk d where dg.group_number = d.group_number and dg.name = 'OCR' order by dg.name, d.failgroup, d.path;

NAME     NAME     SIZE_GB  PATH          FAILGROUP        FAILGRO

--------- ------------------ ---------------- ------------------ -------

OCR      OCR_0000 800 /dev/asmdisk/asm-ocr01    OCR_0000           REGULAR

OCR      OCR_0003 10 /dev/asmdisk/asm-data01 OCR_0000         REGULAR

OCR      OCR_0001 800 /dev/asmdisk/asm-ocr02    OCR_0001           REGULAR

OCR      OCR_0004 10 /dev/asmdisk/asm-data02 OCR_0001         REGULAR

OCR      OCR_0002 800 /dev/asmdisk/asm-ocr03    OCR_0002           REGULAR

OCR      OCR_0005 10 /dev/asmdisk/asm-data03 OCR_0002         REGULAR

 

SQL> exit

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

With the Real Application Clusters and Automatic Storage Management options

[grid@rac01 ~]$ exit

logout

[root@rac01 ~]# ocrcheck

Status of Oracle Cluster Registry is as follows :

      Version                  :          3

      Total space (kbytes)     :     262120

      Used space (kbytes)      :       3128

      Available space (kbytes) :     258992

      ID                       : 1344662935

      Device/File Name         :       +OCR

                                    Device/File integrity check succeeded

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

                                    Device/File not configured

      Cluster registry integrity check succeeded

      Logical corruption check succeeded

 

[root@rac01 ~]# crsctl query css votedisk;

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   7f134ec356a34f44bff06e30740f5a20 (/dev/asmdisk/asm-ocr01) [OCR]

 2. ONLINE   a9b5943bb0b84f6abffc2c91166a2e34 (/dev/asmdisk/asm-ocr02) [OCR]

 3. ONLINE   213d87ebffb04fb2bf0e98546a0e37fb (/dev/asmdisk/asm-ocr03) [OCR]

Located 3 voting disk(s).

 

[root@rac01 ~]# su - grid

[grid@rac01 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 10 19:14:52 2018

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>

SQL>

SQL> select * from gv$asm_operation;

 

no rows selected

 

删除掉OCR磁盘组failgroup OCR_0000中的800g的磁盘

SQL> ALTER DISKGROUP OCR DROP DISK 'OCR_0000';

 

Diskgroup altered.

 

SQL> exit

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

With the Real Application Clusters and Automatic Storage Management options

[grid@rac01 ~]$ exit

logout

 

检查votefile已经放到新的磁盘上

[root@rac01 ~]# crsctl query css votedisk;

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   a9b5943bb0b84f6abffc2c91166a2e34 (/dev/asmdisk/asm-ocr02) [OCR]

 2. ONLINE   213d87ebffb04fb2bf0e98546a0e37fb (/dev/asmdisk/asm-ocr03) [OCR]

 3. ONLINE   5f3fd670edf54f87bfe8d54e0e6118a2 (/dev/asmdisk/asm-data01) [OCR]

Located 3 voting disk(s).

[root@rac01 ~]# su - grid

[grid@rac01 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 10 19:17:38 2018

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

 

把另外两个failgroup的800g的磁盘也删掉

SQL> ALTER DISKGROUP OCR DROP DISK 'OCR_0001';

Diskgroup altered.

SQL> ALTER DISKGROUP OCR DROP DISK 'OCR_0002';

Diskgroup altered.

 

SQL> exit

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

With the Real Application Clusters and Automatic Storage Management options

[grid@rac01 ~]$

[grid@rac01 ~]$

[grid@rac01 ~]$ exit

logout

 

###############################################

 

部分日志

ALTER DISKGROUP OCR DROP DISK 'OCR_0001'

NOTE: GroupBlock outside rolling migration privileged region

NOTE: requesting all-instance membership refresh for group=3

Mon Sep 10 19:17:42 2018

NOTE: Attempting voting file relocation on diskgroup OCR

NOTE: Successful voting file relocation on diskgroup OCR

Mon Sep 10 19:17:42 2018

GMON updating for reconfiguration, group 3 at 48 for pid 31, osid 36625

NOTE: group 3 PST updated.

NOTE: membership refresh pending for group 3/0xaf38a64c (OCR)

GMON querying group 3 at 49 for pid 18, osid 50621

SUCCESS: refreshed membership for 3/0xaf38a64c (OCR)

SUCCESS: ALTER DISKGROUP OCR DROP DISK 'OCR_0001'

NOTE: starting rebalance of group 3/0xaf38a64c (OCR) at power 1

Starting background process ARB0

Mon Sep 10 19:17:45 2018

ARB0 started with pid=34, OS id=37303

NOTE: assigning ARB0 to group 3/0xaf38a64c (OCR) with 1 parallel I/O

cellip.ora not found.

NOTE: F1X0 copy 2 relocating from 1:2 to 4:13 for diskgroup 3 (OCR)

Mon Sep 10 19:17:54 2018

NOTE: Attempting voting file refresh on diskgroup OCR

NOTE: Refresh completed on diskgroup OCR

. Found 3 voting file(s).

NOTE: stopping process ARB0

SUCCESS: rebalance completed for group 3/0xaf38a64c (OCR)

Mon Sep 10 19:17:57 2018

NOTE: GroupBlock outside rolling migration privileged region

NOTE: requesting all-instance membership refresh for group=3

Mon Sep 10 19:18:00 2018

GMON updating for reconfiguration, group 3 at 50 for pid 35, osid 42145

NOTE: group 3 PST updated.

SUCCESS: grp 3 disk OCR_0001 emptied

NOTE: erasing header on grp 3 disk OCR_0001

NOTE: process _x000_+asm1 (42145) initiating offline of disk 1.3915929302 (OCR_0001) with mask 0x7e in group

 3NOTE: initiating PST update: grp = 3, dsk = 1/0xe96856d6, mask = 0x6a, op = clear

GMON updating disk modes for group 3 at 51 for pid 35, osid 42145

NOTE: group OCR: updated PST location: disk 0002 (PST copy 0)

NOTE: group OCR: updated PST location: disk 0003 (PST copy 1)

NOTE: group OCR: updated PST location: disk 0004 (PST copy 2)

NOTE: PST update grp = 3 completed successfully

NOTE: initiating PST update: grp = 3, dsk = 1/0xe96856d6, mask = 0x7e, op = clear

GMON updating disk modes for group 3 at 52 for pid 35, osid 42145

NOTE: cache closing disk 1 of grp 3: OCR_0001

NOTE: PST update grp = 3 completed successfully

GMON updating for reconfiguration, group 3 at 53 for pid 35, osid 42145

NOTE: cache closing disk 1 of grp 3: (not open) OCR_0001

NOTE: group 3 PST updated.

NOTE: membership refresh pending for group 3/0xaf38a64c (OCR)

NOTE: Attempting voting file refresh on diskgroup OCR

NOTE: Refresh completed on diskgroup OCR

. Found 3 voting file(s).

NOTE: Voting file relocation is required in diskgroup OCR

NOTE: Attempting voting file relocation on diskgroup OCR

NOTE: Successful voting file relocation on diskgroup OCR

GMON querying group 3 at 54 for pid 18, osid 50621

GMON querying group 3 at 55 for pid 18, osid 50621

NOTE: Disk OCR_0001 in mode 0x0 marked for de-assignment

SUCCESS: refreshed membership for 3/0xaf38a64c (OCR)

Mon Sep 10 19:18:06 2018

NOTE: Attempting voting file refresh on diskgroup OCR

NOTE: Refresh completed on diskgroup OCR

. Found 3 voting file(s).

 

###############################################

 

 

再次检查,votefile已经全部放在新的磁盘上了

[root@rac01 ~]# crsctl query css votedisk;

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   5f3fd670edf54f87bfe8d54e0e6118a2 (/dev/asmdisk/asm-data01) [OCR]

 2. ONLINE   0e85f73aa7724f6bbfa3dfd423df1a8b (/dev/asmdisk/asm-data02) [OCR]

 3. ONLINE   8cc41d4360884f1fbf758390c921a1ca (/dev/asmdisk/asm-data03) [OCR]

Located 3 voting disk(s).

[root@rac01 ~]# ls -l /dev/asmdisk/

total 0

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data01 -> ../sdk

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data02 -> ../sdl

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data03 -> ../sdo

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data04 -> ../sdn

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data05 -> ../sdm

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data06 -> ../sdp

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data07 -> ../sdb

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data08 -> ../sdc

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-data09 -> ../sdd

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-fra01 -> ../sde

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr01 -> ../sdf

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr02 -> ../sdg

lrwxrwxrwx 1 root root 6 Sep 10 19:22 asm-ocr03 -> ../sdh

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-ocr04 -> ../sdi

lrwxrwxrwx 1 root root 6 Sep 10 19:24 asm-ocr05 -> ../sdj

[root@rac01 ~]# fdisk -l /dev/sdf

 

Disk /dev/sdf: 859.0 GB, 858993459200 bytes

255 heads, 63 sectors/track, 104433 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

[root@rac01 ~]# fdisk -l /dev/sdg

 

Disk /dev/sdg: 859.0 GB, 858993459200 bytes

255 heads, 63 sectors/track, 104433 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

[root@rac01 ~]# fdisk -l /dev/sdh

 

Disk /dev/sdh: 859.0 GB, 858993459200 bytes

255 heads, 63 sectors/track, 104433 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

 

清空退出来的三块800g磁盘的磁盘头信息

 

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdf bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.000933349 s, 2.2 MB/s

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdg bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.00099797 s, 2.1 MB/s

[root@rac01 ~]# dd if=/dev/zero of=/dev/sdh bs=1024 count=2;

2+0 records in

2+0 records out

2048 bytes (2.0 kB) copied, 0.000144885 s, 14.1 MB/s

[root@rac01 ~]#

[root@rac01 ~]#

[root@rac01 ~]#

[root@rac01 ~]#

[root@rac01 ~]# su - grid

[grid@rac01 ~]$ sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 10 19:27:57 2018

 

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

 

把三块800g的磁盘重新加回到data磁盘组

SQL>ALTER DISKGROUP DATA ADD DISK '/dev/asmdisk/asm-ocr01','/dev/asmdisk/asm-ocr02','/dev/asmdisk/asm-ocr03';

 

Diskgroup altered.

 

SQL> select * from gv$asm_operation;

 

   INST_ID GROUP_NUMBER OPERA STAT    POWER      ACTUAL      SOFAR   EST_WORK     EST_RATE EST_MINUTES ERROR_CODE

---------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------- --------------------------------------------

      2         2 REBAL WAIT      1

      1         2 REBAL RUN       1        1       4654  439955        1732   251

 

 

SQL>

SQL> set lines 200 pages 1000

SQL> col name format a15;

col path format a25;

col failgroup format a20;

最终的磁盘组信息

SQL> select dg.name,d.name,d.total_mb/1024 as size_gb, d.path, d.failgroup, d.failgroup_type from v$asm_diskgroup dg, v$asm_disk d where dg.group_number = d.group_number and dg.name = 'OCR' order by dg.name, d.failgroup, d.path;

NAME     NAME     SIZE_GB  PATH            FAILGROUP          FAILGRO

-----    ---------         ------   ------- ------------------------- -------------------- -------

OCR      OCR_0003           10   /dev/asmdisk/asm-data01   OCR_0000           REGULAR

OCR      OCR_0004           10   /dev/asmdisk/asm-data02   OCR_0001           REGULAR

OCR      OCR_0005           10   /dev/asmdisk/asm-data03   OCR_0002           REGULAR

 

SQL> select dg.name,d.name,d.total_mb/1024 as size_gb, d.path, d.failgroup, d.failgroup_type from v$asm_diskgroup dg, v$asm_disk d where dg.group_number = d.group_number and dg.name = 'DATA' order by dg.name, d.failgroup, d.path;

NAME     NAME     SIZE_GB  PATH            FAILGROUP          FAILGRO

--------------- --------------- ------------------------- -------------------- -------

DATA     DATA_0000 800 /dev/asmdisk/asm-ocr01    DATA_0000           REGULAR

DATA     DATA_0001 800 /dev/asmdisk/asm-ocr02    DATA_0001           REGULAR

DATA     DATA_0002 800 /dev/asmdisk/asm-ocr03    DATA_0002           REGULAR

DATA     DATA_0003 10  /dev/asmdisk/asm-data04   DATA_0003           REGULAR

DATA     DATA_0004 10  /dev/asmdisk/asm-data05   DATA_0004           REGULAR

DATA     DATA_0005 800 /dev/asmdisk/asm-data06   DATA_0005           REGULAR

DATA     DATA_0006 800 /dev/asmdisk/asm-data07   DATA_0006           REGULAR

DATA     DATA_0007 800 /dev/asmdisk/asm-data08   DATA_0007           REGULAR

DATA     DATA_0008 800 /dev/asmdisk/asm-data09   DATA_0008           REGULAR

DATA     DATA_0009 800 /dev/asmdisk/asm-ocr04    DATA_0009          REGULAR

DATA     DATA_0010 800 /dev/asmdisk/asm-ocr05    DATA_0010          REGULAR

 

11 rows selected.

上一篇:Python打印乘法口诀表
下一篇:关于数据库用户登录缓慢的问题
CRS-2730集群资源DG无法删除

CRS-2730集群资源DG无法删除

Oracle 热备份与恢复实验

Oracle 热备份与恢复实验

Oracle闪回查询/闪回恢复

Oracle闪回查询/闪回恢复

Oracle 11gR2 归档日志格式/路径修改

Oracle 11gR2 归档日志格式/路径修改

Oracle数据库归档模式的查询和开启以及关闭

Oracle数据库归档模式的查询和开启以及关闭

Oracle 11gR2 静态监听 listener

Oracle 11gR2 静态监听 listener

关于数据库用户登录缓慢的问题

关于数据库用户登录缓慢的问题

发表评论

昵称
邮箱
网址

沙发空闲中,快来抢!