This experiment is based on the RedHatEnterpriseLinux4 system: [root @ www ~] # Cat/proc/versionLinuxversion2.6.9-67. ELsmp (brewbuilder@ls20-bc1-14.build.RedHat.com) & n
This experiment is based on Red Hat Enterprise Linux 4:
- [Root@ Www~] # Cat/proc/version
- Linux version2.6.9-67. ELsmp (brewbuilder@ Ls20-Bc1-14.Build.RedHat.com) (gcc version3.4.6 20060404(Red Hat3.4.6-8))#1SMP Wed Nov7 13:58:04EST2007
[root@www ~]# cat /proc/version Linux version 2.6.9-67.ELsmp (brewbuilder@ls20-bc1-14.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-8)) #1 SMP Wed Nov 7 13:58:04 EST 2007
Download the required rpm package
Http://www.Oracle.com/technology/software/tech/linux/asmlib/rhel4.html
Library and Tools
- Oracleasm-support-2.1.3-1.el4.i386.rpm
- Oracleasmlib-2.0.4-1.el4.i386.rpm
Drivers for kernel 2.6.9-67.0.22.EL
- Oracleasm-2.6.9-67.0.22.ELxenU-2.0.3-1.i686.rpm
- Oracleasm-2.6.9-67.0.22.ELsmp-2.0.3-1.i686.rpm
- Oracleasm-2.6.9-67.0.22.ELhugemem-2.0.3-1.i686.rpm
- Oracleasm-2.6.9-67.0.22.EL-2.0.3-1.i686.rpm
Installation: Java code
- [Root@ Www~] # Rpm-Uvh oracleasm-support-2.1.3-1. El4.i386. rpm
- Preparing... ######################################## ###[100%]
- 1: Oracleasm-support ##################################### ######[100%]
- [Root@ Www~] # Rpm-Uvh oracleasm-2.6.9-67.0.22. EL-2.0.3-1. I686.rpm
- Preparing... ######################################## ###[100%]
- 1: Oracleasm-2.6.9-67.0.22######################################## ###[100%]
- [Root@ Www~] # Rpm-Uvh oracleasmlib-2.0.4-1. El4.i386. rpm
- Preparing... ######################################## ###[100%]
- 1: Oracleasmlib ####################################### ####[100%]
[root@www ~]# rpm -Uvh oracleasm-support-2.1.3-1.el4.i386.rpmPreparing... ########################################### [100%] 1:oracleasm-support ########################################### [100%][root@www ~]# rpm -Uvh oracleasm-2.6.9-67.0.22.EL-2.0.3-1.i686.rpmPreparing... ########################################### [100%] 1:oracleasm-2.6.9-67.0.22########################################### [100%][root@www ~]# rpm -Uvh oracleasmlib-2.0.4-1.el4.i386.rpmPreparing... ########################################### [100%] 1:oracleasmlib ########################################### [100%]
Configuration: Java code
- [Root@ Www~] # Vi/etc/sysconfig/rawdevices
-
- [Root@ Www~] # Cat/etc/sysconfig/rawdevices
- # This file andInterfaceAre deprecated.
- # Applications needing raw device access shoshould open regular
- # Block devices with O_DIRECT.
- # Raw device bindings
- # Format:
- #
- # Example:/dev/raw/raw1/dev/sda1
- #/Dev/raw/raw28 5
- /Dev/raw/raw1/dev/sdd1
- /Dev/raw/raw2/dev/sde1
- /Dev/raw/raw3/dev/sdf1
- /Dev/raw/raw4/dev/sdg1
-
- [Root@ Www~] #/Sbin/service rawdevices restart
- Assigning devices:
- /Dev/raw/raw1 -->/dev/sdd1
- /Dev/raw/raw1: bound to major8, Minor49
- /Dev/raw/raw2 -->/dev/sde1
- /Dev/raw/raw2: bound to major8, Minor65
- /Dev/raw/raw3 -->/dev/sdf1
- /Dev/raw/raw3: bound to major8, Minor81
- /Dev/raw/raw4 -->/dev/sdg1
- /Dev/raw/raw4: bound to major8, Minor97
- Done
-
- [Root@ Www~] # Chown oracle: oinstall/dev/raw [1-4]
- [Root@ Www~] # Chmod660/Dev/raw [1-4]
-
- Modify/etc/udev/permissions. d/50-Udev. permissions. The original device will
- Remap. By default, the owner of the original device is changed to the root user during boot. If
- If the owner is not an oracle user, ASM may encounter problems when accessing the shared partition. In
- /Etc/udev/permissions. d/50-Udev. permissions indicates the original row.
- "Raw/*: root: disk:0660"Add comments, and then add a new line
- "Raw/*: oracle: dba:0660".
-
- [Root@ Www~] # Vi/etc/udev/permissions. d/50-Udev. permissions
- # Raw devices
- Ram *: root: disk:0660
- # Raw/*: root: disk:0660
- Raw/*: oracle: dba:0660
-
- Oracle Logon
- [Oracle@ WwwOracle] $ ln-sf/dev/raw/raw1/db/oracle/asmdisk1
- [Oracle@ WwwOracle] $ ln-sf/dev/raw/raw2/db/oracle/asmdisk2
- [Oracle@ WwwOracle] $ ln-sf/dev/raw/raw3/db/oracle/asmdisk3
- [Oracle@ WwwOracle] $ ln-sf/dev/raw/raw4/db/oracle/asmdisk4
- [Oracle@ WwwOracle] $ ls
- Asmdisk1 asmdisk2 asmdisk3 asmdisk4 product
- [Oracle@ WwwOracle] $ ll
- Total24
- Lrwxrwxrwx1Oracle oinstall13Oct22 15:51Asmdisk1->/dev/raw/raw1
- Lrwxrwxrwx1Oracle oinstall13Oct22 15:51Asmdisk2->/dev/raw/raw2
- Lrwxrwxrwx1Oracle oinstall13Oct22 15:51Asmdisk3->/dev/raw/raw3
- Lrwxrwxrwx1Oracle oinstall13Oct22 15:51Asmdisk4->/dev/raw/raw4
- Drwxrwx ---3Oracle oinstall4096Oct14 22:38Product