--------- Management of asm (Management of Shared disks)
1. Manage the ASM in instance mode. Before starting the database, you must first start the ASM instance. After the ASM instance is started, the ASM disk is mounted.
--------- Install the ASM management software and driver
1. view the operating system kernel version (OS kernel version)
[Root @ rac11 ~] # Uname-
Linux rac11 2.6.9-67. elsmp #1 SMP wed Nov 7 13:58:04 est 2007 i686 i686 i386 GNU/Linux
2. Check whether ASM-related software is installed on the OS.
[Root @ rac01 ~] # Rpm-Qa | grep ASM
Oracleasm-2.6.9-67.EL-2.0.3-1 (same as OS kernel version)
Oracleasmlib-2.0.4-1.el4
Oracleasm-support-2.1.4-1.el4
Install the ASM package
[Root @ rac22 ASM] # rpm-uvh oracleasm-support-2.1.4-1.el4.i386.rpm
[Root @ rac22 ASM] # rpm-uvh oracleasm-2.6.9-67.EL-2.0.3-1.i686.rpm
[Root @ rac22 ASM] # rpm-uvh oracleasmlib-2.0.4-1.el4.i386.rpm
[Root @ rac22 ASM] # rpm-uvh oracleasm-2.6.9-67.ELsmp-2.0.3-1.i686.rpm
[Root @ rac11 ~] # Service oracleasm
Usage:/etc/init. d/oracleasm {START | stop | restart | enable | disable | configure | createdisk | deletedisk | querydisk | listdisks | scandisks | status}
[Root @ rac22 ASM] # service oracleasm status
Checking if ASM is loaded: No
Checking if/dev/oracleasm is mounted: No
[Root @ rac22 ASM] # service oracleasm enable
Writing Oracle ASM library driver configuration: Done
Initializing the Oracle asmlib DRIVER: [OK]
Scanning the system for Oracle asmlib disks: [OK]
[Root @ rac22 ASM] # service oracleasm status
Checking if ASM is loaded: Yes
Checking if/dev/oracleasm is mounted: Yes
[Root @ rac11 ~] # Chkconfig oracleasm on
---------- View the ASM instance initialization parameter file
[Oracle @ rac22 DBS] $ cat init + asm2.ora | grep-V '^ #'
Cluster_database = true
Background_dump_dest =/u01/APP/Oracle/admin/+ ASM/bdump
Core_dump_dest =/u01/APP/Oracle/admin/+ ASM/cdump
User_dump_dest =/u01/APP/Oracle/admin/+ ASM/udump
Instance_type = ASM
Large_pool_size = 12 m
Remote_login_passwordfile = exclusive
Asm_diskgroups = 'data1', 'fra'
+ Asm2.instance _ number = 2
+ Asm1.instance _ number = 1
----------- Access the ASM instance
[Oracle @ rac22 DBS] $ export oracle_sid = + asm2
[Oracle @ rac22 DBS] $ sqlplus/As sysdba
SQL * Plus: Release 10.2.0.1.0-production on Mon Jul 16 09:43:35 2012
Copyright (c) 1982,200 5, Oracle. All rights reserved.
Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Production
With the partitioning, real Application Clusters, OLAP and Data Mining options
SQL> show parameter name
Name type value
-----------------------------------------------------------------------------
Db_file_name_convert string
Db_name string
Db_unique_name string + ASM
Global_names Boolean false
Instance_name string + asm2
Lock_name_space string
Log_file_name_convert string
Service_names string + ASM
------------ You must disable the database before closing the ASM instance.
SQL> shutdown immediate
ORA-15097: cannot shutdown ASM instance with connected RDBMS instance
------------ Close the database and then try to close the ASM instance
[Root @ rac11 ~] # Srvctl stop database-D Prod
[Oracle @ rac11 DBS] $ srvctl status database-D Prod
Instance prod1 is not running on node rac11
Instance prod2 is not running on node rac22
------------ Close the ASM instance
SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance Shutdown
------------- Start the ASM instance
SQL> startup
ASM instance started
Total system global area 92274688 bytes
Fixed size 1217884 bytes
Variable Size 65890980 bytes
ASM cache 25165824 bytes
ASM diskgroups mounted
SQL> DESC v $ asm_diskgroup;
Name null? Type
---------------------------------------------------------------------------------------------------------------------
Group_number number
Name varchar2 (30)
Sector_size number
Block_size number
Allocation_unit_size number
State varchar2 (11)
Type varchar2 (6)
Total_mb number
Free_mb number
Required_pai_free_mb number
Usable_file_mb number
Offline_disks number
Unbalanced varchar2 (1)
Compatibility varchar2 (60)
Database_compatibility varchar2 (60)
----------- View the ASM disk group
SQL> select group_number, name, state, type, total_mb, free_mb, offline_disks from V $ asm_diskgroup;
Group_number name state type total_mb free_mb offline_disks
----------------------------------------------------------------------------------
1 data1 mounted extern 1504 24 0
2 FRA mounted extern 1504 960 0
If you need to reprint the content, please indicate the source and original link
Http://blog.csdn.net/xiangsir/article/details/8576748