OracleASM Operation Management

Source: Internet
Author: User
View the disk information of the ASM: SQLgt; selectgroup_number, disk_number, mount_status, header_status, mode_status, state, failgroup, total_mb,

View the disk information of the ASM SQLgt; select group_number, disk_number, mount_status, header_status, mode_status, state, failgroup, total_mb,

View the ASM disk status

SQL> select group_number, disk_number, mount_status, header_status, mode_status, state, failgroup, total_mb, free_mb, name, path from v $ asm_disk;

View the situation of the ASM disk group
SQL> select group_number, block_size, name, allocation_unit_size, state, type, total_mb, free_mb, offline_disks from v $ asm_diskgroup;

Create an ASM Disk

[Root @ b1 RedHat 5.4-64] #/usr/sbin/Oracleasm createdisk disk1/dev/sdb1

[Root @ b1 redhat 5.4-64] #/usr/sbin/oracleasm createdisk disk2/dev/sdb2

[Root @ b1 redhat 5.4-64] #/usr/sbin/oracleasm querydisk/dev/sdb *
Device "/dev/sdb" is not marked as an ASM disk
Device "/dev/sdb1" is marked an ASM disk with the label "DISK1"
Device "/dev/sdb2" is marked an ASM disk with the label "DISK2"

[Root @ b1 redhat 5.4-64] #/usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[Root @ b1 redhat 5.4-64] #/usr/sbin/oracleasm listdisks
DISK1
DISK2

Delete An ASM Disk

[Root @ b1 ~] #/Usr/sbin/oracleasm deletedisk disk4
Clearing disk header: done

Create an ASM disk group

A. Create an outsourced redundant disk group

Create diskgroup dg1 external redundancy disk 'orcl: disk3 ', 'orcl: disk4 ';

B. Create a common redundant disk group (at least two disks)

Create diskgroup dg1 normal redundancy failgroup fg1 disk 'ORCL: disk3 'failgroup fg2 disk' ORCL: disk4 ';

C. Create a high-redundancy disk group (at least three disks)

Create diskgroup dg1 high redundancy
Failgroup fg1 disk 'ORCL: disk3 'name dg1_a
Failgroup fg2 disk 'ORCL: disk4 'name dg1_ B
Failgroup fg3 disk 'ORCL: disk5 'name dg1_c;

Delete An ASM disk group

Drop diskgroup dg1;

Drop diskgroup dg1 including contents;

Add a disk to the ASM disk group

A. Add disk members to a high-redundancy disk group

Alter diskgroup dg1
Add failgroup fg1 disk 'orcl: disk1'
Add failgroup fg2 disk 'orcl: diskd2'
Add failgroup fg3 disk 'orcl: diskd3 ';

B. Add disk members to an external redundant disk group.

Alter diskgroup dg2 add disk 'orcl: diske2 ';

Delete a disk from the ASM disk group

Alter diskgroup dg1 drop disk diskd1, diskd2, diskd3; -- pay attention to the redundancy mode when deleting, and delete it as needed

Alter diskgroup dg2 drop disk diske2 add disk 'orcl: diske3'; -- add a disk when deleting a disk to reduce the number of rebalancing times

Delete a fault group (delete all disks in the fault group)

Alter diskgroup dg1 drop disks in failgroup fg3;

Add fault group

Alter diskgroup dg1 add failgroup fg3 disk 'orcl: disk5 ';

Add a fault group when deleting a disk

Alter diskgroup dg1 drop disks in failgroup fg3 add failgroup fg4 disk 'orcl: disk6 ';

Stop deleting a disk from a disk group'

Alter diskgroup dgroup_01 undrop disks;

Recommended reading:

How to change the password of ASM sys

How to copy data files in ASM to the Operating System

Restoration After all Oracle 11g rac asm disks are lost

Oracle 11g from entry to proficient in PDF + CD source code

Installing Oracle 11g R2 using RHEL6 ASM

Oracle 10g manual creation of the ASM Database

Solutions to various problems after installing Oracle 11gR2 in Ubuntu 12.04 (amd64)

How to change the sys password of Oracle 10g ASM

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.