search
HomeDatabaseMysql Tutorial创建ASM实例及ASM数据库

文件按分配单元AUs(allocation units)平衡分布在磁盘组的所有磁盘中,ASM使用索引技术来跟踪每个AUs的位置,支持RAC集群技术,每一

--========================

-- 创建ASM实例及ASM数据库

--========================

一、ASM相关概念

1.什么是ASM(Auto Storage Management)

简称自动存储管理,是一种用于管理磁盘的工具

能够在多个物理设备之间实现条带化、镜像数据文件、恢复文件等

文件按分配单元AUs(allocation units)平衡分布在磁盘组的所有磁盘中,ASM使用索引技术来跟踪每个AUs的位置

支持联机磁盘的动态增加和减少,当磁盘发生变化后,AUs会自动重新实现动态分布

支持RAC集群技术,每一节点上运行一个ASM实例,各ASM实例间能实现点对点通讯

是一个纯软件级别的实现方式,第三方RAID工作在卷层次上,使用统一条带大小,ASM可以工作在文件层次级别,不同文件可以使用

不同的条带大小

2.ASM的优点

磁盘增加:增加磁盘变得非常容易。无需停机时间,并且文件区域自动重新分配。

I/O 分配:I/O 自动分布在所有可用的磁盘上,无需人工干预,从而减少了热点出现的可能性。

带区宽度:在重做日志文件中分段可以细分(K,以获得更快的传输速率),对于数据文件,带区则略大一些(MB,以一次性传输大量的数据块)。

缓冲:ASM 文件系统不进行缓冲,直接进行输入/输出。

镜像:如果硬件镜像不可用,则可以容易地建立软件镜像。

核心化的异步I/O :实现核心化的异步I/O 无需特殊的设置,并且无需使用原始或第三方的文件系统(如 Veritas Quick I/O)

3.Oracle 常用数据文件的RAID级别

SYSTEM、UNDO表空间通常置于RAID 1卷上

联机重做日志通常置于RAID 0卷上

控制文件通常置于RAID 0+1 卷上

数据文件通常置于RAID 5卷上

4.ASM体系结构(主要由ASM实例及ASM磁盘组组成)

ASM的使用需要创建一个ASM实例,用于管理ASM磁盘组

ASM磁盘组由ASM磁盘组成,可以包含一个或多个ASM磁盘

ASM磁盘可以是实际的磁盘,也可以是磁盘的某个分区,或LVM管理的逻辑卷,但必须是未格式化的原始设备

ASM磁盘组的大小为该组内ASM磁盘大小的总和,可使用的容量则根据容错级别而有不同的可用大小

5.ASM实例及RDBMS实例

ASM实例类似于普通的数据库实例(RDBMS),同样由SGA和一堆后台进程组成,对大多数系统而言,SGA只需64 MB即可

ASM实例中的LargePool 用于存放Extent Map,可以根据数据库的大小来计算LargePool的大小,通常100GB大小需要1MB存放Extent Map

普通的RDBMS实例会定位数据文件并打开其数据文件,而在使用ASM存储的数据库中,该工作由ASM实例接管,即ASM实例用于定位和

管理ASM磁盘,磁盘组。

ASM实例拥有类似于普通RDBMS实例的后台进程,如SMON,PMON,LGWR,DBWR,CKPT等,,还增添了两个新进程,一类是RBAL,一类是ARBn

RBAL:用于协调和管理磁盘组之间的动态平衡

ARBn:可以为多个,用于完成AU的移动

ASM实例仅仅是定位管理ASM磁盘,不能加载或打开数据库,因此也无法读取数据字典信息

ASM实例通常有个参数,只能使用口令文件或操作系统身份验证作为sysdba或sysoper来启动或关闭该实例。

关于sysdba或sysoper区别请参考:system sys,sysoper sysdba 的区别

一个ASM实例可以为多个RDBMS提供服务,可以在一台主机上创建多个ASM实例,但通常一台主机上使用一个ASM实例

如果一个实例服务于多个RDBMS,建议将ASM的ASM_HOME与DB的ORACLE_HOME分开,便于日后的升级与维护

ASM磁盘组的创建与配置在ASM实例启动之后

使用ASM磁盘的RDBMS实例与普通的RDBMS实例相同,但多出了两个后台进程,RBAL,ASMB。

ASMB借助某个服务器进程如oracle+ASM1建立普通RDBMS实例到ASM实例的会话,并传递磁盘文件的相关信息

RBAL打开通过ASM实例定位的ASM磁盘

注意:ASM 实例并不代替RDBMS实例来读取或写入数据文件,数据是直接在ASM磁盘和RDBMS实例传递,ASM实例仅用于定位数据文件

所在的asm磁盘,盘区以及所需的相关信息。假定新增加数据文件,则RDBMS告知ASM实例要创建数据文件,ASM实例则分配盘区

(extent),并创建盘区映射地址返回给RDBMS实例,RDBMS则将数据直接写入到磁盘组。

6.ASM实例中存储的文件类型

控制文件        参数文件        联机日志文件        归档日志文件        数据文件        临时文件

RMAN备份集、映像副本        控制文件备份集      datapump 转储文件、Change Tracing file

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
Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How to solve the problem of mysql cannot open shared libraryHow to solve the problem of mysql cannot open shared libraryMar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

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.

Run MySQl in Linux (with/without podman container with phpmyadmin)Run MySQl in Linux (with/without podman container with phpmyadmin)Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overviewWhat is SQLite? Comprehensive overviewMar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

Running multiple MySQL versions on MacOS: A step-by-step guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

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]

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]

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 Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

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.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment