In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "Oracle 11.2.0.3 management ASM method is what", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "Oracle 11.2.0.3 how to manage ASM"!
1: Check ASM disk and disk group status
SQL> select * from v$asm_disk;
SQL> select * from v$asm_diskgroup;
2: Create external redundant disk group, add and delete disks, specify disk name instead of path when deleting disks
SQL> create diskgroup FRA external redundancy disk '/dev/asm-disk4';
Diskgroup created.
SQL> alter diskgroup fra add disk '/dev/asm-disk5' rebalance power 10;
Diskgroup altered.
SQL> select name,failgroup,path from v$asm_disk;
NAME FAILGROUP PATH
-------------------- -------------------- --------------------
DATA_0000 DATA_0000 /dev/asm-disk1
DATA_0001 DATA_0001 /dev/asm-disk3
DATA_0002 DATA_0002 /dev/asm-disk2
FRA_0000 FRA_0000 /dev/asm-disk4
FRA_0001 FRA_0001 /dev/asm-disk5
/dev/asm-disk6
/dev/asm-disk7
SQL> alter diskgroup fra drop disk '/dev/asm-disk4' rebalance power 10;
alter diskgroup fra drop disk '/dev/asm-disk4' rebalance power 10
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15054: disk "/DEV/ASM-DISK4" does not exist in diskgroup "FRA"
SQL> alter diskgroup fra drop disk 'FRA_0000' rebalance power 10;
Diskgroup altered.
3: Create a normal redundancy disk group
SQL> conn /as sysasm
Connected.
SQL> create diskgroup fra normal redundancy
failgroup fg1 disk '/dev/asm-disk4','/dev/asm-disk5'
failgroup fg2 disk '/dev/asm-disk6','/dev/asm-disk7'
attribute 'compatible.rdbms'='11.2','compatible.asm'='11.2';
Diskgroup created.
SQL> select name, total_mb,free_mb,required_mirror_free_mb,usable_file_mb from v$asm_diskgroup;
NAME TOTAL_MB FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
---------- ---------- ---------- ----------------------- --------------
DATA 61440 54873 0 18291
FRA 81920 81592 20480 30556
Four: failgroup test;FAILGROUP is used to group disks to ensure that any group of FAILGROUP disks is lost, the data is still complete, mostly used for multiple arrays, and redundant environments are completed through ASM!
1: View failgroup information and disk status in FRA disk group
SQL> select name,path,failgroup,mount_status from v$asm_disk where group_number=2;
NAME PATH FAILGROUP MOUNT_STATUS
-------------------- -------------------- ---------- ---------------------
FRA_0003 /dev/asm-disk7 FG2 CACHED
FRA_0002 /dev/asm-disk6 FG2 CACHED
FRA_0000 /dev/asm-disk4 FG1 CACHED
FRA_0001 /dev/asm-disk5 FG1 CACHED
2: Create table space in rdbms instance, create table and insert data, collect table statistics
SQL> create tablespace test01 datafile '+FRA';
Tablespace created.
ASMCMD> pwd
+fra/db/datafile
ASMCMD> ls
TEST01.256.800622493
SQL> create table t1 tablespace test01 as select * from dba_objects;
Table created.
SQL> exec dbms_stats.gather_table_stats('SYS','T1');
PL/SQL procedure successfully completed.
SQL> select count(*) from t1;
COUNT(*)
----------
74501
3: Delete udev related rules, restart database instance and ASM instance, verify whether data exists
SQL> conn /as sysasm
Connected.
SQL> alter diskgroup fra mount;
alter diskgroup fra mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15040: diskgroup is incomplete
ORA-15042: ASM disk "1" is missing from group number "2"
ORA-15042: ASM disk "0" is missing from group number "2"
SQL> alter diskgroup fra mount force;
Diskgroup altered.
SQL> select name,path,failgroup,mount_status from v$asm_disk;
NAME PATH FAILGROUP MOUNT_STATUS
---------- -------------------- -------------------- ---------------------
FRA_0000 FG1 MISSING
FRA_0001 FG1 MISSING
FRA_0002 /dev/asm-disk6 FG2 CACHED
FRA_0003 /dev/asm-disk7 FG2 CACHED
DATA_0000 /dev/asm-disk1 DATA_0000 CACHED
DATA_0002 /dev/asm-disk2 DATA_0002 CACHED
DATA_0001 /dev/asm-disk3 DATA_0001 CACHED
7 rows selected.
SQL> conn /as sysdba
Connected.
SQL> select count(*) from t1;
COUNT(*)
----------
74501
5. Delete ASM disk group. Under default disk failure condition, it will be deleted automatically after 12960 seconds, that is, 3.6 hours. Before deleting disk group, ensure that no data is stored on disk group and there is no active connection to disk group.
[grid@localhost ~]$ tail -f /u01/app/grid/diag/asm/+asm/+ASM/trace/alert_+ASM.log
ORA-15062: ASM disk is globally closed
Thu Nov 29 12:00:53 2012
WARNING: Disk 0 (FRA_0000) in group 2 will be dropped in: (12960) secs on ASM inst 1
WARNING: Disk 1 (FRA_0001) in group 2 will be dropped in: (12960) secs on ASM inst 1
Thu Nov 29 12:00:58 2012
asm example:
SQL> select path,name,repair_timer from v$asm_disk where group_number=2;
PATH NAME REPAIR_TIMER
-------------------- ---------- ------------
FRA_0000 12960
FRA_0001 12960
/dev/asm-disk6 FRA_0002 0
/dev/asm-disk7 FRA_0003 0
SQL> alter diskgroup fra online disk 'FRA_0000';
Diskgroup altered.
SQL> alter diskgroup fra online disk 'FRA_0001';
Diskgroup altered.
SQL> select name,path,failgroup,mount_status from v$asm_disk;
NAME PATH FAILGROUP MOUNT_STATUS
---------- -------------------- -------------------- ---------------------
FRA_0002 /dev/asm-disk6 FG2 CACHED
FRA_0003 /dev/asm-disk7 FG2 CACHED
DATA_0000 /dev/asm-disk1 DATA_0000 CACHED
DATA_0002 /dev/asm-disk2 DATA_0002 CACHED
DATA_0001 /dev/asm-disk3 DATA_0001 CACHED
FRA_0001 /dev/asm-disk5 FG1 CACHED
FRA_0000 /dev/asm-disk4 FG1 CACHED
SQL> drop diskgroup fra;
drop diskgroup fra
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15053: diskgroup "FRA" contains existing files
rdbms instance:
SQL> drop tablespace test01 including contents;
Tablespace dropped.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
asm example:
SQL> drop diskgroup fra including contents;
Diskgroup dropped.
rdbms instance:
SQL> startup
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1344652 bytes
Variable Size 192940916 bytes
Database Buffers 113246208 bytes
Redo Buffers 6328320 bytes
Database mounted.
Database opened.
At this point, I believe you have a deeper understanding of "Oracle 11.2.0.3 management ASM method is what", might as well come to the actual operation! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.