Configure the ACFS Cluster File System on Centos5

Source: Internet
Author: User

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
 
 
  1. [grid@rac1 ~]$ sqlplus / as sysasm 
  2. SQL*Plus: Release 11.2.0.3.0 Production on Wed Feb 20 10:34:44 2013 
  3. Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
  4.  
  5. Connected to: 
  6. Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production 
  7. With the Real Application Clusters and Automatic Storage Management options 
  8.  
  9. SQL> alter diskgroup data set attribute 'COMPATIBLE.ASM'='11.2'; 
  10. Diskgroup altered. 
  11.  
  12. SQL> alter diskgroup data add volume acfsvol size 1G; 
  13. alter diskgroup data add volume acfsvol size 1G 
  14. ERROR at line 1: 
  15. ORA-15032: not all alterations performed 
  16. ORA-15477: cannot communicate with the volume driver 
  17.  
  18. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s 
  19. ACFS-9459: ADVM/ACFS is not supported on this OS version: 'centos-release-5-8.el5.centos' 
  20.  
  21. [root@rac1 ~]# su - grid 
  22. [grid@rac1 ~]$ export DISPLAY=192.168.1.156:0 
  23. [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
 
 
  1. [Root @ rac1 ~] # Cd/u01/app/11.2.0/grid/lib/
  2. [Root @ rac1 lib] # cp-p osds_acfslib.pm osds_acfslib.pm.bak
  3. [Root @ rac1 lib] # vi osds_acfslib.pm
  4. If (defined ($ release) & # Redhat or OEL if defined
  5. ($ Release = ~ /^ Redhat-release/) | # straight RH
  6. ($ Release = ~ /^ Enterprise-release/) | # Oracle Enterprise Linux
  7. ($ Release = ~ /^ Oraclelinux-release/) # Oracle Linux
  8. {
  9.  
  10. Modify the above code snippet as follows:
  11. If (defined ($ release) & # Redhat or OEL if defined
  12. ($ Release = ~ /^ Redhat-release/) | # straight RH
  13. ($ Release = ~ /^ Enterprise-release/) | # Oracle Enterprise Linux
  14. ($ Release = ~ /^ Centos-release/) | # CentOS hack
  15. ($ Release = ~ /^ Oraclelinux-release/) # Oracle Linux
  16. {
3. Install acfs, configure the acfs and advm modules to start automatic loading, and configure the rac2 nodes in the same way.
 
 
  1. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s 
  2. ACFS-9129: ADVM/ACFS not installed 
  3.  
  4. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsroot install 
  5. ACFS-9300: ADVM/ACFS distribution files found. 
  6. ACFS-9307: Installing requested ADVM/ACFS software. 
  7. ACFS-9308: Loading installed ADVM/ACFS drivers. 
  8. ACFS-9321: Creating udev for ADVM/ACFS. 
  9. ACFS-9323: Creating module dependencies - this may take some time. 
  10. ACFS-9154: Loading 'oracleoks.ko' driver. 
  11. ACFS-9154: Loading 'oracleadvm.ko' driver. 
  12. ACFS-9154: Loading 'oracleacfs.ko' driver. 
  13. ACFS-9327: Verifying ADVM/ACFS devices. 
  14. ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'. 
  15. ACFS-9156: Detecting control device '/dev/ofsctl'. 
  16. ACFS-9309: ADVM/ACFS installation correctness verified. 
  17.  
  18. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/acfsload start -s 
  19.  
  20. [root@rac1 ~]# lsmod |grep oracle 
  21. oracleacfs           1670360  1  
  22. oracleadvm            260320  5  
  23. oracleoks             321904  2 oracleacfs,oracleadvm 
  24.  
  25. [root@rac1 ~]# cat > /etc/init.d/acfsload <<EOF 
  26. > #!/bin/sh 
  27. > # chkconfig: 2345 30 21 
  28. > # description: Load Oracle ASM volume driver on system startup  
  29. > ORACLE_HOME=/u01/app/11.2.0/grid 
  30. > export ORACLE_HOME 
  31. > \$ORACLE_HOME/bin/acfsload start -s 
  32. > EOF 
  33.  
  34. [root@rac1 ~]# chmod 755 /etc/init.d/acfsload 
  35. [root@rac1 ~]# chkconfig --add acfsload 
  36. [root@rac1 ~]# chkconfig --list | grep acfsload 
  37. acfsload        0:off   1:off   2:on    3:on    4:on    5:on    6:off 
4. Add ora. registry. acfs to ocr Configuration
 
 
  1. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl add type ora.registry.acfs.type \ 
  2. > -basetype ora.local_resource.type \ 
  3. > -file /u01/app/11.2.0/grid/crs/template/registry.acfs.type 
  4.  
  5. [root@rac1 ~]# /u01/app/11.2.0/grid/bin/crsctl add resource ora.registry.acfs \ 
  6. > -attr ACL=\'owner:root:rwx,pgrp:oinstall:r-x,other::r--\' \ 
  7. > -type ora.registry.acfs.type -f 
  8.  
  9. [root@rac1 ~]# su - grid -c crs_stat | grep acfs 
  10. NAME=ora.registry.acfs 
  11. TYPE=ora.registry.acfs.type 
  12.  
  13. [root@rac2 ~]# su - grid -c crs_stat | grep acfs 
  14. NAME=ora.registry.acfs 
  15. TYPE=ora.registry.acfs.type 
  16. [root@rac1 ~]# /sbin/acfsutil registry 
5. Create and format the volume into an acfs cluster file system and mount it.
 
 
  1. SQL> alter diskgroup data add volume acfsvol size 1G; 
  2. Diskgroup altered. 
  3.  
  4. [root@rac1 ~]# mkdir /sharedisk 
  5. [root@rac2 ~]# mkdir /sharedisk 
  6. [root@rac1 ~]# /sbin/mkfs -t acfs -n ACFSVOL1 /dev/asm/acfsvol-53  
  7. mkfs.acfs: version                   = 11.2.0.3.0 
  8. mkfs.acfs: on-disk version           = 39.0 
  9. mkfs.acfs: volume                    = /dev/asm/acfsvol-53 
  10. mkfs.acfs: volume size               = 1073741824 
  11. mkfs.acfs: Format complete. 
  12.  
  13. [root@rac1 ~]# /sbin/acfsutil registry -a -f /dev/asm/acfsvol-53 /sharedisk/ 
  14. acfsutil registry: mount point /sharedisk successfully added to Oracle Registry 
  15.  
  16. [root@rac1 ~]# mount.acfs -o all 
  17. [root@rac1 ~]# df -h 
  18. Filesystem            Size  Used Avail Use% Mounted on 
  19. /dev/mapper/VolGroup00-LogVol00 
  20.                        93G   19G   70G  21% / 
  21. /dev/sda1             190M   17M  165M   9% /boot 
  22. tmpfs                 2.0G  1.2G  807M  60% /dev/shm 
  23. /dev/asm/acfsvol-53   1.0G   39M  986M   4% /sharedisk 
  24.  
  25. [root@rac2 ~]# mount.acfs -o all 
  26. [root@rac2 ~]# df -h 
  27. Filesystem            Size  Used Avail Use% Mounted on 
  28. /dev/mapper/VolGroup00-LogVol00 
  29.                        93G   12G   77G  14% / 
  30. /dev/sda1              99M   17M   78M  18% /boot 
  31. tmpfs                 2.0G  1.2G  807M  60% /dev/shm 
  32. /dev/asm/acfsvol-53   1.0G   73M  952M   8% /sharedisk 
  33.  
  34. [root@rac1 ~]# /sbin/acfsutil info fs  
  35. /sharedisk 
  36.     ACFS Version: 11.2.0.3.0 
  37.     flags:        MountPoint,Available 
  38.     mount time:   Wed Feb 20 12:11:52 2013 
  39.     volumes:      1 
  40.     total size:   1073741824 
  41.     total free:   998002688 
  42.     primary volume: /dev/asm/acfsvol-53 
  43.         label:                 ACFSVOL1 
  44.         flags:                 Primary,Available,ADVM 
  45.         on-disk version:       39.0 
  46.         allocation unit:       4096 
  47.         major, minor:          252, 27137 
  48.         size:                  1073741824 
  49.         free:                  998002688 
  50.         ADVM diskgroup         DATA 
  51.         ADVM resize increment: 33554432 
  52.         ADVM redundancy:       unprotected 
  53.         ADVM stripe columns:   4 
  54.         ADVM stripe width:     131072 
  55.     number of snapshots:  0 
  56.     snapshot space usage: 0 
  57.     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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.