簡單配置ASM
環境描述
資料庫版本:Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
新增磁碟
新增三塊硬碟,用來做ASM磁碟組:
三塊磁碟最好一樣大, 不一樣大在做冗餘時容易導致熱點競爭,增大磁碟的I/O,影響效能。
重啟一下系統,格式磁碟
啟動系統後fdisk -l檢視載入的磁碟,fdisk /dev/sdb對sdb進行格式化
[root@localhost ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1044, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]# fdisk /dev/sdc
[root@localhost ~]# fdisk /dev/sdd
[root@localhost ~]# fdisk -l
看到如下資訊 sdb、sbc、sdd三塊磁碟將用來做ASM磁碟組
Disk /dev/sdb: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1044 8385898+ 83 Linux
Disk /dev/sdc: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdc1 1 1044 8385898+ 83 Linux
Disk /dev/sdd: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdd1 1 1044 8385898+ 83 Linux
安裝配置ASM
上傳asm包,查詢對應版本,安裝asm包
[root@localhost asm]# ls
oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
oracleasm-2.6.9-67.EL-2.0.3-1.i686.rpm
oracleasm-2.6.9-67.ELhugemem-2.0.3-1.i686.rpm
oracleasm-2.6.9-67.ELsmp-2.0.3-1.i686.rpm
oracleasm-2.6.9-67.ELxenU-2.0.3-1.i686.rpm
oracleasmlib-2.0.4-1.el4.i386.rpm
oracleasm-support-2.1.4-1.el4.i386.rpm
[root@localhost asm]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
[root@localhost asm]# rpm -ivh oracleasm-support-2.1.4-1.el4.i386.rpm
warning: oracleasm-support-2.1.4-1.el4.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [100%]
[root@localhost asm]# rpm -ivh oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:oracleasm-2.6.18-164.el########################################### [100%]
[root@localhost asm]# rpm -ivh oracleasmlib-2.0.4-1.el4.i386.rpm
warning: oracleasmlib-2.0.4-1.el4.i386.rpm: Header V3 DSA signature: NOKEY, key ID b38a8516
Preparing... ########################################### [100%]
1:oracleasmlib ########################################### [100%]
[root@localhost asm]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
建立asmdisk
[root@localhost asm]# /etc/init.d/oracleasm createdisk asm_1 /dev/sdb1
Marking disk "asm_1" as an ASM disk: [ OK ]
[root@localhost asm]# /etc/init.d/oracleasm createdisk asm_2 /dev/sdc1
Marking disk "asm_2" as an ASM disk: [ OK ]
[root@localhost asm]# /etc/init.d/oracleasm createdisk asm_3 /dev/sdd1
Marking disk "asm_3" as an ASM disk: [ OK ]
[root@localhost asm]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@localhost asm]# /etc/init.d/oracleasm listdisks
ASM_1
ASM_2
ASM_3
DBCA建立asm
asm一來css服務,建立前先啟動css
[root@localhost ~]# /u01/app/oracle/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
Create new disk
此時會發現剛建立的ASM磁碟組free僅為所有磁碟的一般,預設的一般磁碟用來做冗餘
接下來就是按照常規的dbca建立資料庫,但是選擇asm做儲存
其他步驟根據自己需求選擇即可,此處不贅述
安裝完成設定ASM例項,即可管理ASM
[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> select status from v$instance;
STATUS
------------
STARTED
SQL> col name for a11
SQL> col failgroup for a11
SQL> select state,total_mb,free_mb,name,failgroup from v$asm_disk;
STATE TOTAL_MB FREE_MB NAME FAILGROUP
-------- ---------- ---------- ----------- -----------
NORMAL 8189 7374 ASM_GROUP1 ASM_GROUP1
NORMAL 8189 7379 ASM_GROUP2 ASM_GROUP2
NORMAL 8189 7382 ASM_GROUP3 ASM_GROUP3
SQL> select group_number,name,state,type,total_mb,free_mb,unbalanced from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB U
------------ ----------- ----------- ------ ---------- ---------- -
1 DATA MOUNTED NORMAL 24567 22135 N
設定資料庫例項即可登入資料庫
[oracle@localhost ~]$ export ORACLE_SID=orclasm
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 30 17:02:29 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> col TABLESPACE_NAME for a15
SQL> col FILE_NAME for a47
SQL> select tablespace_name,file_name from dba_data_files;
TABLESPACE_NAME FILE_NAME
--------------- -----------------------------------------------
USERS +DATA/orcl_asm/datafile/users.259.854297377
SYSAUX +DATA/orcl_asm/datafile/sysaux.257.854297377
UNDOTBS1 +DATA/orcl_asm/datafile/undotbs1.258.854297377
SYSTEM +DATA/orcl_asm/datafile/system.256.854297375
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1349497/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM簡單管理ASM
- Oracle 10gR2 下配置簡單ASM例項Oracle 10gASM
- 單機環境配置ASM例項ASM
- Webapck 簡單配置Web
- ASM磁碟簡單維護,新增,刪除ASM
- VS code 簡單配置
- SELinux簡單配置Linux
- mysql cluster 簡單配置MySql
- squid 簡單配置UI
- 單機環境安裝配置ASM例項ASM
- Web Scraper簡單配置方法Web
- spingMVC框架簡單配置MVC框架
- VsCode簡單配置VSCode
- webpack(簡單安裝配置)Web
- LINUX FTP簡單配置LinuxFTP
- Redhat 簡單本地yum 配置Redhat
- Windows下Subversion簡單配置Windows
- VSFTP的簡單配置FTP
- Linux NTP 簡單配置Linux
- oracle10gR1 asm儲存簡單示例OracleASM
- 【ORACLE ASM】ASM 支援工具簡介OracleASM
- asm重新配置ASM
- Solaris下配置ASMASM
- 配置並建立ASMASM
- 一個簡單多庫配置
- node webpack4.6簡單配置Web
- window下mongodb的簡單配置MongoDB
- 簡單安裝配置lighttpdhttpd
- 簡單的ANT配置檔案
- RedHat6.2簡單配置dhcpRedhat
- 簡單配置PostFix伺服器伺服器
- mysql goldengate同步 簡單配置MySqlGo
- postfix安裝和簡單配置
- linux bind dns簡單配置LinuxDNS
- 【ASK_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(一)ASMFD簡介OracleASMFilter
- Django安裝與簡單配置(1)Django
- Elasticsearch 的安裝和簡單配置Elasticsearch
- 伺服器簡單郵箱配置伺服器