Use ASM to create an Oracle database

Source: Internet
Author: User

Environment: OS: Red Hat Linux As 5DB: Oracle 10.2.0.4 10 Gb later, Oracle launched the Storage method managed by Using ASM (Auto Storage Management). As the Oralce version keeps changing, the ASM storage management method is becoming more and more stable. the following describes how to use ASM to create a single-instance database. -------------------------------- create an ASM disk ------------------------------------------ 1. the version used to install Asmlib to install AsmlibB depends on the OS kernel version. Here, my OS kernel version is as follows: [root @ hxl asm] # uname-
Linux hxl 2.6.18-8. el5xen #1 SMP Fri Jan 26 14:42:21 EST 2007 i686 i686 i386 GNU/Linux select and install the following Asmlib package. Run the package in the following order as the root user. Otherwise, a message indicating dependency is displayed. [root @ hxl asm] # rpm-ivh oracleasm-support-2.1.7-1.el5.i386.rpm
[Root @ hxl asm] # rpm-ivh oracleasm-2.6.18-8.el5xen-2.0.4-1.el5.i686.rpm
[Root @ hxl asm] # rpm-ivh oracleasmlib-2.0.4-1.el5.i386.rpm
These installation packages can be downloaded from the Oracle official website. 2. add a bare device and edit/etc/udev/rules. add the following content to the d/60-raw.rules file: ACTION = "add", KERNEL = "sdb1", RUN + = "/bin/raw/dev/raw/raw1% N"
ACTION = "add", KERNEL = "sdc1", RUN + = "/bin/raw/dev/raw/raw2% N"
ACTION = "add", KERNEL = "sdd1", RUN + = "/bin/raw/dev/raw/raw3% N" set bare Device Permissions for oracle users, add the following content
KERNEL = "raw [1-3] *", NAME = "raw/% k" OWNER = "oracle" GROUP = "oinstall ", MODE = "0660" here, sdb1 sdc1 sdd1 is the newly added disk partition. After adding a hard disk, you can use fdisk to create a partition (the specific steps are omitted). No formatting is required here. add the content above to/etc/udev/rules. d/60-raw.rules and then execute the following command to make it take effect. [root @ hxl asm] # start_udev view ing
[Root @ hxl] # raw-qa
/Dev/raw/raw1: bound to major 8, minor 17
/Dev/raw/raw2: bound to major 8, minor 33
/Dev/raw/raw3: bound to major 8, minor 49
After the bare device is added, configure Asmlib. 3. Set ASMlib driver [root @ hxl oracle] #/etc/init. d/oracleasm configure.
Installing ing the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library
Driver. The following questions will determine whether the driver is
Loaded on boot and what permissions it will have. The current values
Will be shown in brackets ('[]'). Hitting <ENTER> without typing
Answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface [oracle]:
Default group to own the driver interface [oinstall]:
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [OK]
Scanning the system for Oracle ASMLib disks: [OK] 4. Set Automatic startup and Shutdown
# By default, cd/etc/rc5.d enters the graphic interface.
[Root @ hxl rc5.d] # ln-s/etc/rc. d/init. d/oracleasm S99oracleasm
[Root @ hxl rc5.d] # ln-s/etc/rc. d/init. d/oracleasm K01oracleasm [root @ hxl rc5.d] # lsmod | grep oracleasm
Oracleasm 44692 1
[Root @ hxl rc5.d] # dmesg | grep oracleasm
ASM: oracleasmfs mounted with options: <defaults> 5. create an ASM disk (Note: createdisk is for partitioning, not for disks, that is, you should first partition the disk) [root @ hxl oracle] #/etc/init. d/oracleasm createdisk VOL1/dev/sdb1
Marking disk "VOL1" as an ASM disk: [OK]
[Root @ hxl oracle] #/etc/init. d/oracleasm createdisk VOL2/dev/sdc1
Marking disk "VOL2" as an ASM disk: [OK]
[Root @ hxl oracle] #/etc/init. d/oracleasm createdisk VOL3/dev/sdd1
Marking disk "VOL3" as an ASM disk: [FAILED] in an episode, the system prompts "FAILED" when creating VOL3. Check the log and find that the device is in use.
[Root @ hxl oracle] # less/var/log/oracleasmInstantiating disk: done
Unable to open device "/dev/sdd1": Device or resource busy
Unable to open device "/dev/sdd1": Device or resource busy. View/etc/fstab and find/dev/sdd1 mounted to/u02. comment out the line and solve the problem. [root @ hxl/] # more/etc/fstab
LABEL = // ext3 defaults 1 1
Devpts/dev/pts devpts gid = 5, mode = 620 0 0
Tmpfs/dev/shm tmpfs defaults 0 0
Proc/proc defaults 0 0
Sysfs/sys sysfs defaults 0 0
LABEL =/u01/u01 ext3 defaults 1 2
/Dev/sdd1/u02 ext3 defaults 1 2
LABEL = SWAP-sda2 swap defaults 0 0 [root @ hxl oracle] #/etc/init. d/oracleasm createdisk VOL3/dev/sdd1
Marking disk "VOL3" as an ASM disk: [OK] [root @ hxl oracle] #/etc/init. d/oracleasm listdisks // list ASM Disks
VOL1
VOL2
From VOL3 to here, the ASM disk has been created, and the ASM instance is created below.

  • 1
  • 2
  • 3
  • Next Page

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.