After installing an oracle 11.2.0.3 rac test environment on the 64-bit centos5.8 system, it is found that acfs and advm cannot be used, and the acfs and volume tabs on the ASMCA graphic interface are gray! This is because acfs does not support the centos system. The following describes how to use the acfs Cluster File System on centos!
I. Problem Description
- [grid@rac1 ~]$ sqlplus / as sysasm
- SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 20 10:34:44 2013
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
-
- Connected to:
- Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
- With the Real Application Clusters and Automatic Storage Management options
-
- SQL> alter diskgroup data set attribute 'COMPATIBLE.ASM'='11.2';
- Diskgroup altered.
-
- SQL> alter diskgroup data add volume acfsvol size 1G;
- alter diskgroup data add volume acfsvol size 1G
- *
- ERROR at line 1:
- ORA-15032: not all alterations performed
- ORA-15477: cannot communicate with the volume driver
-
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s
- ACFS-9459: ADVM/ACFS is not supported on this OS version: 'centos-release-5-8.el5.centos'
-
- [root@rac1 ~]# su - grid
- [grid@rac1 ~]$ export DISPLAY=192.168.1.156:0
- [grid@rac1 ~]$ asmca
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/1R5153Q6-0.jpg "border =" 0 "alt =" "/> 2: Modify the osds_acfslib.pm script code, the rac2 node does the same modification
- [Root @ rac1 ~] # Cd/u01/app/11.2.0/grid/lib/
- [Root @ rac1 lib] # cp-p osds_acfslib.pm osds_acfslib.pm.bak
- [Root @ rac1 lib] # vi osds_acfslib.pm
- If (defined ($ release) & # Redhat or OEL if defined
- ($ Release = ~ /^ Redhat-release/) | # straight RH
- ($ Release = ~ /^ Enterprise-release/) | # Oracle Enterprise Linux
- ($ Release = ~ /^ Oraclelinux-release/) # Oracle Linux
- {
-
- Modify the above code snippet as follows:
- If (defined ($ release) & # Redhat or OEL if defined
- ($ Release = ~ /^ Redhat-release/) | # straight RH
- ($ Release = ~ /^ Enterprise-release/) | # Oracle Enterprise Linux
- ($ Release = ~ /^ Centos-release/) | # CentOS hack
- ($ Release = ~ /^ Oraclelinux-release/) # Oracle Linux
- {
3. Install acfs, configure the acfs and advm modules to start automatic loading, and configure the rac2 nodes in the same way.
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s
- ACFS-9129: ADVM/ACFS not installed
-
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsroot install
- ACFS-9300: ADVM/ACFS distribution files found.
- ACFS-9307: Installing requested ADVM/ACFS software.
- ACFS-9308: Loading installed ADVM/ACFS drivers.
- ACFS-9321: Creating udev for ADVM/ACFS.
- ACFS-9323: Creating module dependencies - this may take some time.
- ACFS-9154: Loading 'oracleoks.ko' driver.
- ACFS-9154: Loading 'oracleadvm.ko' driver.
- ACFS-9154: Loading 'oracleacfs.ko' driver.
- ACFS-9327: Verifying ADVM/ACFS devices.
- ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
- ACFS-9156: Detecting control device '/dev/ofsctl'.
- ACFS-9309: ADVM/ACFS installation correctness verified.
-
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s
-
- [root@rac1 ~]# lsmod |grep oracle
- oracleacfs 1670360 1
- oracleadvm 260320 5
- oracleoks 321904 2 oracleacfs,oracleadvm
-
- [root@rac1 ~]# cat > /etc/init.d/acfsload <<EOF
- > #!/bin/sh
- > # chkconfig: 2345 30 21
- > # description: Load Oracle ASM volume driver on system startup
- > ORACLE_HOME=/u01/app/11.2.0/grid
- > export ORACLE_HOME
- > \$ORACLE_HOME/bin/acfsload start -s
- > EOF
-
- [root@rac1 ~]# chmod 755 /etc/init.d/acfsload
- [root@rac1 ~]# chkconfig --add acfsload
- [root@rac1 ~]# chkconfig --list | grep acfsload
- acfsload 0:off 1:off 2:on 3:on 4:on 5:on 6:off
4. Add ora. registry. acfs to ocr Configuration
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl add type ora.registry.acfs.type \
- > -basetype ora.local_resource.type \
- > -file /u01/app/11.2.0/grid/crs/template/registry.acfs.type
-
- [root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl add resource ora.registry.acfs \
- > -attr ACL=\'owner:root:rwx,pgrp:oinstall:r-x,other::r--\' \
- > -type ora.registry.acfs.type -f
-
- [root@rac1 ~]# su - grid -c crs_stat | grep acfs
- NAME=ora.registry.acfs
- TYPE=ora.registry.acfs.type
-
- [root@rac2 ~]# su - grid -c crs_stat | grep acfs
- NAME=ora.registry.acfs
- TYPE=ora.registry.acfs.type
- [root@rac1 ~]# /sbin/acfsutil registry
5. Create and format the volume into an acfs cluster file system and mount it.
- SQL> alter diskgroup data add volume acfsvol size 1G;
- Diskgroup altered.
-
- [root@rac1 ~]# mkdir /sharedisk
- [root@rac2 ~]# mkdir /sharedisk
- [root@rac1 ~]# /sbin/mkfs -t acfs -n ACFSVOL1 /dev/asm/acfsvol-53
- mkfs.acfs: version = 11.2.0.3.0
- mkfs.acfs: on-disk version = 39.0
- mkfs.acfs: volume = /dev/asm/acfsvol-53
- mkfs.acfs: volume size = 1073741824
- mkfs.acfs: Format complete.
-
- [root@rac1 ~]# /sbin/acfsutil registry -a -f /dev/asm/acfsvol-53 /sharedisk/
- acfsutil registry: mount point /sharedisk successfully added to Oracle Registry
-
- [root@rac1 ~]# mount.acfs -o all
- [root@rac1 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 93G 19G 70G 21% /
- /dev/sda1 190M 17M 165M 9% /boot
- tmpfs 2.0G 1.2G 807M 60% /dev/shm
- /dev/asm/acfsvol-53 1.0G 39M 986M 4% /sharedisk
-
- [root@rac2 ~]# mount.acfs -o all
- [root@rac2 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 93G 12G 77G 14% /
- /dev/sda1 99M 17M 78M 18% /boot
- tmpfs 2.0G 1.2G 807M 60% /dev/shm
- /dev/asm/acfsvol-53 1.0G 73M 952M 8% /sharedisk
-
- [root@rac1 ~]# /sbin/acfsutil info fs
- /sharedisk
- ACFS Version: 11.2.0.3.0
- flags: MountPoint,Available
- mount time: Wed Feb 20 12:11:52 2013
- volumes: 1
- total size: 1073741824
- total free: 998002688
- primary volume: /dev/asm/acfsvol-53
- label: ACFSVOL1
- flags: Primary,Available,ADVM
- on-disk version: 39.0
- allocation unit: 4096
- major, minor: 252, 27137
- size: 1073741824
- free: 998002688
- ADVM diskgroup DATA
- ADVM resize increment: 33554432
- ADVM redundancy: unprotected
- ADVM stripe columns: 4
- ADVM stripe width: 131072
- number of snapshots: 0
- snapshot space usage: 0
- replication status: DISABLED
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131229/1R5151447-1.jpg "border =" 0 "alt =" "/> refer to the following articles, thank you for sharing! Http://www.idevelopment.info/data/Oracle/DBA_tips/Automatic_Storage_Management/ASM_50.shtml
This article is from the "Bo Yue" blog and will not be reproduced!