search
HomeDatabaseMysql Tutorial 用PXE方法从裸机批量推Oracle 11gR2 RAC成套环境

用PXE方法从裸机批量推Oracle11gR2RAC成套环境,并用Shell脚本在推出的RAC节点上批量部署32个Oracle11gR2RAC备份恢复案例场景的方法用PXE方法从裸机批量推Oracle

用PXE方法从裸机批量推Oracle 11gR2 RAC成套环境,并用Shell脚本在推出的RAC节点上批量部署32个Oracle11gR2 RAC备份恢复案例场景的方法

用PXE方法从裸机批量推Oracle 11gR2 RAC成套环境,并用Shell脚本在推出的RAC节点上批量部署32个Oracle11gR2 RAC备份恢复案例场景的方法


中国科学院ARP项目实施顾问,上海Oracle用户组成员 唐波


摘要


本文前半段介绍:用PXE推送端主机,把原先处于裸机状态的三台一套 PXE被推送端主机批量推成Oracle 11gR2 RAC环境的方法。在每套推出的Oracle 11gR2 RAC环境中,都包含已自动安装并配置好的三台主机:一台共享磁盘主机和两台节点主机。每套推出的Oracle 11gR2 RAC环境中的两台节点主机都已自动挂接上该套环境内部的共享磁盘主机。两台节点主机各配备一个分布式虚拟磁带库,并且做好所有操作系统层面的配置:包括vip、scan-vip、ntp,各种rpm包和操作系统参数等。

本 文后半段介绍:如何复用以上的PXE推送端主机作为部署平台,在每套推出的Oracle 11gR2 RAC环境中部署32个Oracle11gR2 RAC备份恢复案例场景脚本。脚本基于网络执行并批量部署;脚本同时支持下载到每一台Oracle11gR2 RAC节点主机本地运行。脚本能模拟和评测每一套环境每一个备份恢复场景的恢复结果。

本文中所提及的所有原创程序均提供下载和md5sum文件。 读者使用这些程序不应出于商业目的,作者对使用这些程序可能带来的一切后果不承担任何法律责任。






目录


1. PXE概览

1.1 PXE概览

1.2 IP地址规划

2. PXE推送端主机的搭建

2.1 PXE推送端主机的搭建

2.2 下载将要用于推送的安装软件

2.3 从PXE被推送端主机收集MAC地址

3. PXE被推送端主机:Oracle 11gR2 RAC环境共享磁盘主机

4. PXE被推送端主机:Oracle 11gR2 RAC环境节点主机

4.1共享存储

4.2 分布式虚拟磁带库

4.3 时间同步

4.4 grid用户和 oracle用户

4.5 ssh等价性脚本

4.6 其他

4.7 安装

5. 用Shell脚本在推出的节点上批量部署32个Oracle11gR2 RAC备份恢复案例场景

5.1 备份恢复案例场景模拟脚本工作原理

5.2 在PXE推送端主机上安装备份恢复案例场景模拟脚本

5.3 在Oracle 11gR2 RAC环境节点主机部署备份恢复案例场景模拟脚本

5.3.1 在PXE推送端主机上准备IP地址列表

5.3.2 在PXE推送端主机上初始化实验脚本

6. Oracle11gR2 RAC环境“dd”和“rever”,在后续特定实验前通过“rever”初始化环境

7. Oracle11gR2 RAC备份恢复案例一:完全恢复类场景批量模拟以及恢复要点

7.1 1a_users表空间在线损坏

7.2 1b_下线user表空间损坏

7.3 1c_只读user表空间损坏

7.4 1d_users表空间热备

7.5 3_system表空间离线损坏

7.6 4_tbsocp05_test没有备份的表空间损坏

8. Oracle11gR2 RAC备份恢复案例二:不完全恢复类场景批量模拟以及恢复要点

8.1 5_基于时间的不完全恢复

8.2 6a_基于log序列号的不完全恢复

8.3 6b_基于cancel的不完全恢复

8.4 7a_当前控制文件和数据文件完好_日志文件全部损坏_正常关机不完全恢复_数据不丢_不需备份

8.5 7b_当前控制文件和数据文件完好_日志文件全部损坏_不正常关机不完全恢复

8.6 8a_当前控制文件损坏_不完全恢复_用控制文件二进制备份_数据不丢_不需备份

8.7 8b_当前控制文件损坏_完全恢复_用控制文件脚本_不需备份

8.8 9a_当前控制文件损坏_下线user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份

8.9 9b_当前控制文件损坏_下线user表空间完全恢复_用控制文件脚本_不需备份

8.10 9c_当前控制文件损坏_只读user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份

8.11 9d_当前控制文件损坏_只读user表空间完全恢复_用控制文件脚本_不需备份

8.12 10a_当前控制文件损坏_备份时下线user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份

8.13 10b_当前控制文件损坏_备份时下线user表空间完全恢复_用控制文件脚本_不需备份

8.14 10c_当前控制文件损坏_备份时只读user表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份

8.15 10d_当前控制文件损坏_备份时只读user表空间完全恢复_用控制文件脚本_不需备份

9. Oracle11gR2 RAC备份恢复案例三:进阶不完全恢复类场景批量模拟以及恢复要点

9.1 11a_当前控制文件和日志文件全部损坏_不完全恢复_用控制文件二进制备份

9.2 11b_当前控制文件和日志文件全部损坏_不完全恢复_用控制文件脚本

9.3 12a_当前控制文件和日志文件全部损坏_备份时下线user表空间不完全恢复_用控制文件二进制备份

9.4 12b_当前控制文件和日志文件全部损坏_备份时下线user表空间不完全恢复_用控制文件脚本

9.5 12c_当前控制文件和日志文件全部损坏_备份时只读user表空间不完全恢复_用控制文件二进制备份

9.6 12d_当前控制文件和日志文件全部损坏_备份时只读user表空间不完全恢复_用控制文件脚本

9.7 13a_当前控制文件损坏_新建tbsocp05_test2表空间不完全恢复_用控制文件二进制备份_数据不丢_不需备份

9.8 13b_当前控制文件损坏_新建tbsocp05_test3表空间完全恢复_用控制文件脚本_不需备份

9.9 14_删除表空间不完全恢复

9.10 15_穿越incarnation不完全恢复

总结






正文


1. PXE概览


1.1 PXE概览


PXE(Pre-boot Execution Environment)是由Intel设计的协议,它可以使裸机通过网络启动,并被安装上操作系统。协议分为推送端和被推送端两端。

PXE推送端主机是一台协同运行着dhcpd、tftpd、nfs、dns、vsftpd和httpd的标准Linux服务器。

PXE 被推送端程序从网卡的ROM中激活。当计算机引导时,BIOS把PXE 被推送端程序调入内存执行,并显示出命令菜单。经用户选择后,PXE 被推送端将放置在PXE 推送端主机的操作系统通过网络下载到本地运行,继而实现kernel启动。启动后PXE被推送端实际上是主动从PXE 推送端主机下载安装程序和安装选项文件,完成后续安装步骤。

1.2 IP地址规划


为 了能够把下文叙述清楚,我们设定在192.168.0.0/24网段工作。操作系统分别使用6系RHEL和5系OEL。如果使用其他6系 Enterprise Linux和5系Enterprise Linux(如:CentOS,RHEL或OEL,包括它们的32位或64位发行版)步骤大同小异,本文同样适用。


主机操作系统外网IP内网IP主机名

PXE推送端主机RedHat Enterprise Linux 6.1 x86_64(或其他6系Enterprise Linux和5系Enterprise Linux)192.168.0.254无server1.example.com

PXE被推送端主机之Oracle 11gR2 RAC环境共享磁盘主机RedHat Enterprise Linux 6.1(或其他6系Enterprise Linux)192.168.0.50+x

(x取值范围1到39)

172.31.118.50+x

(x取值范围1到39)

station50+x.example.com

(x取值范围1到39)

PXE被推送端主机之Oracle 11gR2 RAC环境节点主机(第一台)Oracle Enterprise Linux 5.4(或其他5系Enterprise Linux)IP:192.168.0.x

VIP:192.168.0.200+x

SCAN-VIP1:192.168.0.100+x

SCAN-VIP2: 192.168.0.150+x

(x取值范围1到39)

172.31.118.x

(x取值范围1到39)

stationx.example.com

(x取值范围1到39)

PXE被推送端主机之Oracle 11gR2 RAC环境节点主机(第二台)同上IP:192.168.0.1+x

VIP:192.168.0.201+x

SCAN-VIP3:192.168.0.101+x

(x取值范围1到39)

172.31.118.1+x

(x取值范围1到39)

station1+x.example.com

(x取值范围1到39)

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
What Are the Limitations of Using Views in MySQL?What Are the Limitations of Using Views in MySQL?May 14, 2025 am 12:10 AM

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

Securing Your MySQL Database: Adding Users and Granting PrivilegesSecuring Your MySQL Database: Adding Users and Granting PrivilegesMay 14, 2025 am 12:09 AM

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

What Factors Influence the Number of Triggers I Can Use in MySQL?What Factors Influence the Number of Triggers I Can Use in MySQL?May 14, 2025 am 12:08 AM

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

MySQL: Is it safe to store BLOB?MySQL: Is it safe to store BLOB?May 14, 2025 am 12:07 AM

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

MySQL: Adding a user through a PHP web interfaceMySQL: Adding a user through a PHP web interfaceMay 14, 2025 am 12:04 AM

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL: BLOB and other no-sql storage, what are the differences?MySQL: BLOB and other no-sql storage, what are the differences?May 13, 2025 am 12:14 AM

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

MySQL Add User: Syntax, Options, and Security Best PracticesMySQL Add User: Syntax, Options, and Security Best PracticesMay 13, 2025 am 12:12 AM

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

MySQL: How to avoid String Data Types common mistakes?MySQL: How to avoid String Data Types common mistakes?May 13, 2025 am 12:09 AM

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use