RAC重用裸设备
在重新搭建一套RAC环境的时候,因为不想多建新的OCR/VOTING DISK共享磁盘,就打算使用上一套RAC环境中用过的共享磁盘。也考虑过,
环境:
VBOX
Oracle ENTERPRISE LINUX 5.8_X86_64
ORACLE DATABASE 10.2.0.1.0
ORACLE CLUSTERWARE 10.2.0.1.0
在重新搭建一套RAC环境的时候,因为不想多建新的OCR/VOTING DISK共享磁盘,就打算使用上一套RAC环境中用过的共享磁盘。也考虑过,重用这些共享磁盘,可能会出一些状况,打算尝试一下,看看在哪些步骤上会出问题。
推荐阅读:
裸设备创建ASM磁盘
Oracle通过软连接裸设备建库
AIX系统下增加Oracle temp 表空间 (裸设备方式)
为了减少出错几率,在使用UDEV绑定裸设备(共有5个裸设备供OCR、VOTING DISK使用,OCR: /dev/raw/raw1-/dev/sdb1; /dev/raw/raw2-/dev/sdc1; VOTING DISK: /dev/raw/raw3-/dev/sdd1; /dev/raw/raw4-/dev/sde1; /dev/raw/raw5-/dev/sdf1)之前,把原分区sdb1, sdc1, sdd1, sde1, sdf1用fdisk删除并重建了分区。
开始安装CLUSTERWARE,安装过程没有问题,,按照上面的分布方式把裸设备分配给了OCR/VOTING DISK。
但是在第一个节点执行$ORA_CRS_HOME/root.sh时,报错:
[root@rac5 rules.d]# /s01/app/oracle/product/10.2.0/crs_1/root.sh
WARNING: directory '/s01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/s01/app/oracle/product' is not owned by root
WARNING: directory '/s01/app/oracle' is not owned by root
WARNING: directory '/s01/app' is not owned by root
WARNING: directory '/s01' is not owned by root
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Failed to upgrade Oracle Cluster Registry configuration
同时发现:
[root@rac5 rules.d]# ll /dev/raw/
total 0
crw-r----- 1 root oinstall 162, 1 Apr 7 08:12 raw1
crw-r----- 1 root oinstall 162, 2 Apr 7 08:12 raw2
crw-r--r-- 1 oracle oinstall 162, 3 Apr 7 08:12 raw3
crw-r--r-- 1 oracle oinstall 162, 4 Apr 7 08:12 raw4
crw-r--r-- 1 oracle oinstall 162, 5 Apr 7 08:12 raw5
查看日志:
/s01/app/oracle/product/10.2.0/crs_1/log/rac5/client/ocrconfig_6661.log
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. All rights reserved.
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]ocrconfig starts...
2014-04-07 08:12:14.376: [ OCRCONF][1305384672]Upgrading OCR data
2014-04-07 08:12:14.390: [ OCRCONF][1305384672]OCR already in current version.
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to call clsssinit (21)
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Failed to make a backup copy of OCR
2014-04-07 08:12:14.406: [ OCRCONF][1305384672]Exiting [status=failed]...
果然,“不负我望”,还是出问题了,看来用fdisk不解决问题啊!
查了一番帖子,采用了如下方式:
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdb1
dd: writing to `/dev/sdb1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.6793 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdc1
dd: writing to `/dev/sdc1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.1222 seconds, 7.2 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdd1
dd: writing to `/dev/sdd1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 76.5027 seconds, 7.0 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sde1
dd: writing to `/dev/sde1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 75.4561 seconds, 7.1 MB/s
[root@rac5 rules.d]# dd if=/dev/zero of=/dev/sdf1
dd: writing to `/dev/sdf1': No space left on device
1044163+0 records in
1044162+0 records out
534610944 bytes (535 MB) copied, 74.4116 seconds, 7.2 MB/s
然后重新执行root.sh,就成功了!其实我对dd也不熟悉,查了一下说法:/dev/zero文件代表一个永远输出 0的设备文件,使用它作输入可以得到全为空的文件。
好吧,就是把之前被用过的几个裸设备变成彻底空白。就可以重新使用了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

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
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.

SQL statements can be created and executed based on runtime input by using Oracle's dynamic SQL. The steps include: preparing an empty string variable to store dynamically generated SQL statements. Use the EXECUTE IMMEDIATE or PREPARE statement to compile and execute dynamic SQL statements. Use bind variable to pass user input or other dynamic values to dynamic SQL. Use EXECUTE IMMEDIATE or EXECUTE to execute dynamic SQL statements.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node
