Asm creates and deletes disks, disk groups, and rebalance operations, and asmrebalance

Source: Internet
Author: User

Asm creates and deletes disks, disk groups, and rebalance operations, and asmrebalance

[grid@lzl1 ~]$ sqlplus / as sysasmSQL*Plus: Release 11.2.0.3.0 Production on Fri Oct 20 15:20:44 2017Copyright (c) 1982, 2011, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit ProductionWith the Real Application Clusters and Automatic Storage Management optionsSQL>

Existing Disk

SQL> select name,free_mb,total_mb from v$asm_disk;NAME   FREE_MB   TOTAL_MB------------------------------ ---------- ----------DATA_0002     44245120DATA_0001     44245120DATA_0000     44195120CRS_0002     30895120CRS_0001     30825120CRS_0000     308951206 rows selected.SQL> select group_number,operation,state,power from v$asm_operation;no rows selected


Delete Disk

SQL> alter diskgroup DATA drop disk DATA_0002 rebalance power 5;Diskgroup altered.SQL>  select group_number,operation,state,power from v$asm_operation;GROUP_NUMBER OPERA STAT      POWER------------ ----- ---- ----------  2 REBAL RUN5


Rebalance operation in progress

SQL> /no rows selectedSQL>  select name,free_mb,total_mb,path,state,mount_status,header_status from v$asm_disk;SQL> col name for a10;SQL> /NAME       FREE_MBTOTAL_MB PATHSTATE  MOUNT_S HEADER_STATU---------- ---------- ---------- --------------- -------- ------- ------------    0      0 /dev/asm-diskg  NORMAL   CLOSED  FORMERDATA_0001 4075    5120 /dev/asm-diskf  NORMAL   CACHED  MEMBERDATA_0000 4074    5120 /dev/asm-diske  NORMAL   CACHED  MEMBERCRS_0002 3089    5120 /dev/asm-diskd  NORMAL   CACHED  MEMBERCRS_0001 3082    5120 /dev/asm-diskc  NORMAL   CACHED  MEMBERCRS_0000 3089    5120 /dev/asm-diskb  NORMAL   CACHED  MEMBER6 rows selected.

The disk is deleted but still recognized.

Used mb = (5120-4424) + (5120-4424) + (5120-4419) + (2093-) =

Used mb = (5120-4075) + (5120-4074) = 2091 for the DATA group after drop

We can see that used mb is almost equal, and rebalance distributes the data in the drop disk to other disks.


Create a disk group SQL> create diskgroup fra external redundancy disk '/dev/asm-diskg'; Diskgroup created. SQL> select name, free_mb, total_mb, path, state, mount_status, header_status from v $ asm_disk; NAME ready PATHSTATE MOUNT_S HEADER_STATU ---------- bytes -------- -------------- FRA_0000 5070 5120/dev/asm-diskg normal cached MEMBERDATA_0001 4075 5120/dev/asm-diskf normal cached limit 4074 5120/dev/ asm-diske normal cached MEMBERCRS_0002 3089 5120/dev/asm-diskd normal cached MEMBERCRS_0001 3082 5120/dev/asm-diskc normal cached MEMBERCRS_0000 3089 5120/dev/asm-diskb normal cached MEMBER6 rows selected.

Asm uses asm_diskstring to identify Disks

SQL> show parameter stringNAME     TYPE VALUE------------------------------------ ----------- ------------------------------asm_diskstring     string/dev/asm*


Add a new disk to the FRA disk group.

[root@lzl1 Desktop]# ls /dev/asm-*/dev/asm-diskb  /dev/asm-diskd  /dev/asm-diskf  /dev/asm-diskh/dev/asm-diskc  /dev/asm-diske  /dev/asm-diskg

The shared device has been configured./dev/asm-diskg is newly added.

SQL>select name,free_mb,total_mb,path,state,mount_status,header_status from v$asm_disk;NAME      FREE_MBTOTAL_MB PATHSTATE MOUNT_S HEADER_STATU---------- ---------- ---------- --------------- -------- ------- ------------   0       0 /dev/asm-diskh  NORMAL   CLOSED  CANDIDATEFRA_0000 5070    5120 /dev/asm-diskg  NORMAL   CACHED  MEMBERDATA_0001 4075   5120 /dev/asm-diskf  NORMAL   CACHED  MEMBERDATA_0000 4074   5120 /dev/asm-diske  NORMAL   CACHED  MEMBERCRS_0002 3089    5120 /dev/asm-diskd  NORMAL   CACHED  MEMBERCRS_0001 3082    5120 /dev/asm-diskc  NORMAL   CACHED  MEMBERCRS_0000 3089    5120 /dev/asm-diskb  NORMAL   CACHED  MEMBER7 rows selected


Automatically recognized

Query another view

SQL>  select name,free_mb,total_mb,path,state,mount_status,header_status from v$asm_disk_stat;NAME      FREE_MBTOTAL_MB PATHSTATE MOUNT_S HEADER_STATU---------- ---------- ---------- --------------- -------- ------- ------------FRA_0000 5070    5120 /dev/asm-diskg  NORMAL   CACHED  MEMBERDATA_0001 4075   5120 /dev/asm-diskf  NORMAL   CACHED  MEMBERDATA_0000 4074   5120 /dev/asm-diske  NORMAL   CACHED  MEMBERCRS_0002 3089    5120 /dev/asm-diskd  NORMAL   CACHED  MEMBERCRS_0001 3082    5120 /dev/asm-diskc  NORMAL   CACHED  MEMBERCRS_0000 3089    5120 /dev/asm-diskb  NORMAL   CACHED  MEMBER6 rows selected.


V $ asm_disk_stat does not display the new disk

V $ asm_disk_stat description in the official documentation

V $ ASM_DISK_STAT displays performance statistics in the same way that V $ ASM_DISK does, but without discovery of new disks. this results in a less expensive operation. however, since discovery is not found med, the output of this view does not include any data about disks that are new to the system.
The columns for V $ ASM_DISK_STAT are the same as those for V $ ASM_DISK.





Copyright Disclaimer: This article is an original article by the blogger. For more information, see the source.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.