簡單配置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/29320885/viewspace-1242628/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM磁碟簡單維護,新增,刪除ASM
- oracle10gR1 asm儲存簡單示例OracleASM
- Webapck 簡單配置Web
- VS code 簡單配置
- logback的簡單配置
- spingMVC框架簡單配置MVC框架
- 【ASK_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(一)ASMFD簡介OracleASMFilter
- Web Scraper簡單配置方法Web
- webpack(簡單安裝配置)Web
- 16位簡單ASM題的記錄——[HGAME 2022 week1]easyasmASMGAM
- 一個簡單多庫配置
- 交換機的簡單配置
- node webpack4.6簡單配置Web
- RAC+DG(asm單例項)ASM單例
- 一個簡單vue.config.js配置和axios簡單封裝VueJSiOS封裝
- 伺服器簡單郵箱配置伺服器
- Elasticsearch 的安裝和簡單配置Elasticsearch
- Django安裝與簡單配置(1)Django
- CentOS 7 以上防火牆簡單配置CentOS防火牆
- Spring Cloud Gateway + Nacos(1)簡單配置SpringCloudGateway
- 配置中心之Nacos簡介,使用及Go簡單整合Go
- Mybatis【配置檔案】就是這麼簡單MyBatis
- 把玩Alpine linux(三):簡單手動配置Linux
- webpack4簡單實用配置解析Web
- 簡單說說webpack的配置檔案Web
- log4j簡單配置解釋
- Ubuntu-kali配置動態ip(簡單)Ubuntu
- 01 . SaltStack部署配置及簡單應用
- Oracle OCP(42):ASM 儲存結構簡介OracleASM
- Gulp4 Koa專案簡單配置示例
- PostgreSQLlibpqmulti-host配置與簡單HA實現SQL
- TS3AudioBot的簡單安裝配置S3
- jenkins簡單安裝及配置(Windows環境JenkinsWindows
- ASM單例項安裝後,需要手動設定ASM的引數檔案ASM單例
- RAC之grid叢集安裝及ASM磁碟組配置ASM
- 【BUILD_ORACLE】Oracle RAC配置ASM Filter Driver(ASMFD)(二)詳細配置步驟UIOracleASMFilter
- Laravel5.7+vue+element-ui 配置及簡單使用LaravelVueUI
- Mysql Master-slave複製簡單配置記錄MySqlAST
- SpringBoot獲取配置檔案,就這麼簡單。Spring Boot