oracle10g中的asm的配置(轉)
oracle10g中的asm的配置(轉)[@more@]asm的使用
ASM ( Automatic Storage Management)
一安裝和配置
rpm -Uvh oracleasm-support-1.0.2-1.i386.rpm
oracleasm-lib-1.0.0-1.i386.rpm
oracleasm-2.4.21-EL-1.0.0-1.i686.rpm (相應的kernel)
/etc/init.d/oracleasm configure
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration [ OK ]
Creating /dev/oracleasm mount point [ OK ]
Loading module "oracleasm" [ OK ]
Mounting ASMlib driver filesystem [ OK ]
Scanning system for ASM disks [ OK ]
二建立ASM 磁碟(asm只是正對分割槽)
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
Marking disk "/dev/sdc" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
Marking disk "/dev/sdd" as an ASM disk [ OK ]
#/etc/init.d/oracleasm createdisk VOL4 /dev/sde1
Marking disk "/dev/sde" as an ASM disk [ OK ]
#/etc/init.d/oracleasm listdisks
如果要刪除ASM 磁碟透過以下命令:
# /etc/init.d/oracleasm deletedisk VOL4
Removing ASM disk "VOL4" [ OK ]
注意:如果是在RAC 環境中的某一個節點中新增了ASM 磁碟,那麼需要在其它的節點上
執行scandisk 來獲取這種變化。
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks [ OK ]
三建立asm磁碟組
su – oracle
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> create diskgroup dgroup1 normal redundancy (EXTERNAL REDUNDANCY)
2 failgroup fgroup1 disk 'ORCL:VOL1','ORCL:VOL2'
3 failgroup fgroup2 disk 'ORCL:VOL3','ORCL:VOL4';
Diskgroup created.
SQL> select name,state from v$asm_diskgroup;
SQL> ALTER DISKGROUP dgroup1 MOUNT;
SQL> show parameter asm_diskgroups
SQL>ALTER DISKGROUP ALL DISMOUNT;
SQL>ALTER DISKGROUP ALL SMOUNT;
四增加一個ASM卷
#/etc/init.d/oracleasm createdisk VOL5 /dev/sdf1
#/etc/init.d/oracleasm createdisk VOL6 /dev/sdg1
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> ALTER DISKGROUP DGROUP1 ADD
FAILGROUP FGROUP1 DISK 'ORCL:VOL5'
FAILGROUP FGROUP2 DISK 'ORCL:VOL6' rebalance power 11 ;
注:Oracle透過一個新增的引數:asm_power_limit 來控制速度。
該引數取值範圍為1~11,引數值越大平衡速度越快。
檢查資料庫的auto rebalance 工作進度,資料庫正在將原來分佈在兩個磁碟上的資料平均分配到三個磁碟上
SQL> SELECT group_number, operation, state, est_work, sofar, est_rate, est_minutes FROM v$asm_operation;
五ASM資料庫的啟動順序
1.以oracle 使用者進入作業系統
2. $ export ORACLE_SID=+ASM
3. SQL> sqlplus / as sysdba
4. SQL> startup
5. SQL> exit
6. $ export ORACLE_SID=
7. SQL> sqlplus / as sysdba
8. SQL> startup
六建立一個自己的表空間,建立一個使用者,建立一個表
SQL> create tablespace ts_test datafile '+DGROUP1' size 200M;
SQL> create user kamus identified by pass default tablespace ts_test;
SQL> grant dba to kamus;
SQL> create table t_test as select * from dba_objects;
七登入ASM 例項,將磁碟從磁碟組中刪除
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> alter diskgroup dgroup1 drop disk VOL4;
SQL>select group_number, operation, state, est_work, sofar, est_rate,est_minutes FROM v$asm_operation;
SQL>select name,allocation_unit_size,total_mb from v$asm_diskgroup;
SQL> select label,failgroup from v$asm_disk;
SQL> SELECT disk_number, label FROM V$asm_disk;
注.對於oracle中AMS的spfile檔案和資料例項的spfile檔案是不同的
獲取方法:
export ORACLE_SID=+ASM
sqlplus /as sysdba
sql> CREATE PFILE='/oraback/spfile+ASM.ora' FROM SPFILE;
export ORACLE_SID=orcl
sqlplus /as sysdba
sql> CREATE PFILE='/oraback/spfile.ora' FROM SPFILE;
ASM ( Automatic Storage Management)
一安裝和配置
rpm -Uvh oracleasm-support-1.0.2-1.i386.rpm
oracleasm-lib-1.0.0-1.i386.rpm
oracleasm-2.4.21-EL-1.0.0-1.i686.rpm (相應的kernel)
/etc/init.d/oracleasm configure
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration [ OK ]
Creating /dev/oracleasm mount point [ OK ]
Loading module "oracleasm" [ OK ]
Mounting ASMlib driver filesystem [ OK ]
Scanning system for ASM disks [ OK ]
二建立ASM 磁碟(asm只是正對分割槽)
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
Marking disk "/dev/sdc" as an ASM disk [ OK ]
# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
Marking disk "/dev/sdd" as an ASM disk [ OK ]
#/etc/init.d/oracleasm createdisk VOL4 /dev/sde1
Marking disk "/dev/sde" as an ASM disk [ OK ]
#/etc/init.d/oracleasm listdisks
如果要刪除ASM 磁碟透過以下命令:
# /etc/init.d/oracleasm deletedisk VOL4
Removing ASM disk "VOL4" [ OK ]
注意:如果是在RAC 環境中的某一個節點中新增了ASM 磁碟,那麼需要在其它的節點上
執行scandisk 來獲取這種變化。
# /etc/init.d/oracleasm scandisks
Scanning system for ASM disks [ OK ]
三建立asm磁碟組
su – oracle
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> create diskgroup dgroup1 normal redundancy (EXTERNAL REDUNDANCY)
2 failgroup fgroup1 disk 'ORCL:VOL1','ORCL:VOL2'
3 failgroup fgroup2 disk 'ORCL:VOL3','ORCL:VOL4';
Diskgroup created.
SQL> select name,state from v$asm_diskgroup;
SQL> ALTER DISKGROUP dgroup1 MOUNT;
SQL> show parameter asm_diskgroups
SQL>ALTER DISKGROUP ALL DISMOUNT;
SQL>ALTER DISKGROUP ALL SMOUNT;
四增加一個ASM卷
#/etc/init.d/oracleasm createdisk VOL5 /dev/sdf1
#/etc/init.d/oracleasm createdisk VOL6 /dev/sdg1
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> ALTER DISKGROUP DGROUP1 ADD
FAILGROUP FGROUP1 DISK 'ORCL:VOL5'
FAILGROUP FGROUP2 DISK 'ORCL:VOL6' rebalance power 11 ;
注:Oracle透過一個新增的引數:asm_power_limit 來控制速度。
該引數取值範圍為1~11,引數值越大平衡速度越快。
檢查資料庫的auto rebalance 工作進度,資料庫正在將原來分佈在兩個磁碟上的資料平均分配到三個磁碟上
SQL> SELECT group_number, operation, state, est_work, sofar, est_rate, est_minutes FROM v$asm_operation;
五ASM資料庫的啟動順序
1.以oracle 使用者進入作業系統
2. $ export ORACLE_SID=+ASM
3. SQL> sqlplus / as sysdba
4. SQL> startup
5. SQL> exit
6. $ export ORACLE_SID=
7. SQL> sqlplus / as sysdba
8. SQL> startup
六建立一個自己的表空間,建立一個使用者,建立一個表
SQL> create tablespace ts_test datafile '+DGROUP1' size 200M;
SQL> create user kamus identified by pass default tablespace ts_test;
SQL> grant dba to kamus;
SQL> create table t_test as select * from dba_objects;
七登入ASM 例項,將磁碟從磁碟組中刪除
export ORACLE_SID=+ASM
sqlplus / as sysdba
SQL> alter diskgroup dgroup1 drop disk VOL4;
SQL>select group_number, operation, state, est_work, sofar, est_rate,est_minutes FROM v$asm_operation;
SQL>select name,allocation_unit_size,total_mb from v$asm_diskgroup;
SQL> select label,failgroup from v$asm_disk;
SQL> SELECT disk_number, label FROM V$asm_disk;
注.對於oracle中AMS的spfile檔案和資料例項的spfile檔案是不同的
獲取方法:
export ORACLE_SID=+ASM
sqlplus /as sysdba
sql> CREATE PFILE='/oraback/spfile+ASM.ora' FROM SPFILE;
export ORACLE_SID=orcl
sqlplus /as sysdba
sql> CREATE PFILE='/oraback/spfile.ora' FROM SPFILE;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10617731/viewspace-961603/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Flex ASM的配置和轉換FlexASM
- 配置ASM磁碟-轉載ASM
- ASM的安裝配置ASM
- ASM的配置與管理ASM
- oracle10G新特性之ASM的應用OracleASM
- 刪除oracle10g中的垃圾表?(轉)Oracle
- oracle10g asm---第三回---asmOracleASM
- Oracle10g在Solaris10上的安裝配置(轉)Oracle
- 用vmware體驗Oracle10g的ASM資料庫OracleASM資料庫
- oracle10g ASM transport_tablespaceOracleASM
- oracle中的asm文化OracleASM
- oracle10g ASM+RAC安裝OracleASM
- 在Oracle10g 新增ASM磁碟組OracleASM
- Oracle10g使用ASM注意事項OracleASM
- Oracle10g RAC ASM磁碟組[zt]OracleASM
- CENTOS下oracle10g安裝的配置CentOSOracle
- Oracle ASM (10) - ASM中優先讀failure group配置ASM_PREFERRED_READ_FAILURE_GROUPSOracleASMAI
- Oracle ASM (11) - ASM中優先讀failure group配置ASM_PREFERRED_READ_FAILURE_GROUPSOracleASMAI
- 深度理解Oracle10g中UNDO_RETENTION引數的使用(轉)Oracle
- Oracle10g RAC ASM 環境日常管理OracleASM
- 建立 Oracle10g ASM 資料庫(1)OracleASM資料庫
- Linux 系統中的Samba配置(轉)LinuxSamba
- 訪問ASM中的檔案ASM
- 簡單配置ASMASM
- asm重新配置ASM
- Solaris下配置ASMASM
- 配置並建立ASMASM
- oracle10g中的bigfile tablespaceOracle
- 在Oracle10g RAC下新增ASM磁碟組OracleASM
- 搭建 VM + RHLE5 + Oracle10g Rac + ASMOracleASM
- [zt] Oracle10g ASM Auto IO Rebalance新特性及ASM體系結構OracleASM
- Oracle10g中SCN與TimeStamp轉換Oracle
- [轉]RedHat 5中裸裝置(raw)的配置Redhat
- 紅旗Linux中LILO的配置(轉)Linux
- Linux 系統中的Samba配置(轉貼)LinuxSamba
- Oracle10g新特性——RMAN(轉來的)Oracle
- ORACLE10G DG配置下Physical Standby Database的管理OracleDatabase
- 存貯在asm中的ocr/votedisk/asm磁碟組損害的恢復ASM