search
HomeDatabaseMysql Tutorial手动创建Oracle 10g ASM磁盘组

准备环境:Oracle 10g 联机文档、已经配置10g数据库软件的主机、oracleasm library rpm包、2块5GB硬盘1、 查看本机磁盘信息[roo

准备环境:

Oracle 10g 联机文档、已经配置10g数据库软件的主机、oracleasm library rpm包、2块5GB硬盘

1、  查看本机磁盘信息

[root@shiyueasm~]# fdisk -l

 

Disk/dev/sda: 16.1 GB, 16106127360 bytes

255 heads,63 sectors/track, 1958 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sda1   *        307        1958    13269690  83  Linux

/dev/sda2               1         306    2457913+  82 Linux swap

 

Partitiontable entries are not in disk order

 

Disk/dev/sdb: 10.7 GB, 10737418240 bytes

255heads, 63 sectors/track, 1305 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sdb1   *          1        1305    10482381  83  Linux

 

Disk/dev/sdc: 5368 MB, 5368709120 bytes

255heads, 63 sectors/track, 652 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

Disk/dev/sdc doesn't contain a valid partition table

 

Disk/dev/sdd: 5368 MB, 5368709120 bytes

255heads, 63 sectors/track, 652 cylinders

Units =cylinders of 16065 * 512 = 8225280 bytes

 

Disk /dev/sdd doesn't contain a validpartition table

2、  对新添加的2块磁盘进行分区

[root@shiyueasm~]# fdisk /dev/sdc

Devicecontains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Buildinga new DOS disklabel. Changes will remain in memory only,

until youdecide to write them. After that, of course, the previous

contentwon't be recoverable.

 

Warning:invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command(m for help): n

Commandaction

   e  extended

   p  primary partition (1-4)

p

Partitionnumber (1-4): 1

Firstcylinder (1-652, default 1):

Usingdefault value 1

Lastcylinder or +size or +sizeM or +sizeK (1-652, default 652):

Usingdefault value 652

 

Command(m for help): w

Thepartition table has been altered!

 

Callingioctl() to re-read partition table.

Syncingdisks.

[root@shiyueasm~]# fdisk /dev/sdd

Devicecontains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Buildinga new DOS disklabel. Changes will remain in memory only,

until youdecide to write them. After that, of course, the previous

contentwon't be recoverable.

 

Warning:invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command(m for help): n

Commandaction

   e  extended

   p  primary partition (1-4)

p

Partitionnumber (1-4): 1

Firstcylinder (1-652, default 1):

Usingdefault value 1

Lastcylinder or +size or +sizeM or +sizeK (1-652, default 652):

Usingdefault value 652

 

Command(m for help): w

Thepartition table has been altered!

 

Callingioctl() to re-read partition table.

Syncing disks.

 

3、  上传 oracle asmlibrary rpm包并对上传的包进行安装

[root@shiyueasmu01]# cd asm\ rpm\ for\ rhel4.0/

[root@shiyueasmasm rpm for rhel4.0]# ll

total 236

-rw-r--r--  1 root root 129218 Apr 29  2010oracleasm-2.6.9-42.ELsmp-2.0.3-1.i686.rpm

-rw-r--r--  1 root root 13105 Apr 29  2010oracleasmlib-2.0.4-1.el4.i386.rpm

-rw-r--r--  1 root root 82542 Apr 29  2010oracleasm-support-2.1.3-1.el4.i386.rpm

[root@shiyueasmasm rpm for rhel4.0]# rpm -ivh *

warning:oracleasmlib-2.0.4-1.el4.i386.rpm: V3 DSA signature: NOKEY, key ID b38a8516

Preparing...               ########################################### [100%]

   1:oracleasm-support     ########################################### [ 33%]

  2:oracleasm-2.6.9-42.ELsm########################################### [67%]

   3:oracleasmlib          ########################################### [100%]

 

4、  配置ASM驱动

[root@shiyueasm~]# /etc/init.d/oracleasm configure

Configuringthe Oracle ASM library driver.

 

This willconfigure the on-boot properties of the Oracle ASM library

driver.  The following questions will determinewhether the driver is

loaded onboot and what permissions it will have. The current values

will beshown in brackets ('[]').  Hitting without typing an

answerwill keep that current value.  Ctrl-Cwill abort.

 

Defaultuser to own the driver interface []: oracle

Defaultgroup to own the driver interface []: oinstall

StartOracle ASM library driver on boot (y/n) [n]: y

Scan forOracle ASM disks on boot (y/n) [y]:

WritingOracle ASM library driver configuration: done

Initializingthe Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLibdisks: [  OK  ]

5、  创建ASM磁盘组

[root@shiyueasm~]# /etc/init.d/oracleasm createdisk VOL01 '/dev/sdc1'

Markingdisk "VOL02" as an ASM disk: [ OK  ]

[root@shiyueasm~]# /etc/init.d/oracleasm createdisk VOL02 '/dev/sdd1'

Marking disk "VOL01" as anASM disk: [  OK  ]

6、  手动创建磁盘组参数文件

[oracle@shiyueasm~]$ cd $ORACLE_HOME/dbs

[oracle@shiyueasmdbs]$ ll

total 48

-rw-r--r--  1 oracle oinstall   934 May 26 10:52 db.sql

-rw-rw----  1 oracle oinstall  1544 May 26 10:32 hc_shiyue.dat

-rw-r-----  1 oracle oinstall 12920 May  3  2001initdw.ora

-rw-r-----  1 oracle oinstall  8385 Sep 11 1998 init.ora

-rw-r--r--  1 oracle oinstall   996 May 26 10:31 initshiyue.ora

-rw-rw----  1 oracle oinstall    24 May 26 10:52 lkSHIYUE

-rw-r-----  1 oracle oinstall  1536 May 26 10:32 orapwshiyue

[oracle@shiyueasm dbs]$ viinit+ASM.ora

asm_diskstring=''

background_dump_dest=/u01/admin/shiyueasm/bdump

core_dump_dest=/u01/admin/shiyueasm/cdump

user_dump_dest=/u01/admin/shiyueasm/udump

instance_type='asm'

large_pool_size=20m

remote_login_passwordfile='shared'

7、  创建相关目录

[oracle@shiyueasm~]$ mkdir -p /u01/admin/shiyueasm/bdump

[oracle@shiyueasm~]$ mkdir -p /u01/admin/shiyueasm/cdump

[oracle@shiyueasm ~]$ mkdir -p/u01/admin/shiyueasm/udump

8、  切换至ASM实例

[oracle@shiyueasm ~]$ export ORACLE_SID=+ASM

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

How do you handle large datasets in MySQL?How do you handle large datasets in MySQL?Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

How do you drop a table in MySQL using the DROP TABLE statement?How do you drop a table in MySQL using the DROP TABLE statement?Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you represent relationships using foreign keys?How do you represent relationships using foreign keys?Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do you create indexes on JSON columns?How do you create indexes on JSON columns?Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)?Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.