Create an ASM disk group

Source: Internet
Author: User
An ASM disk is an ASM disk pool managed as a logical unit. Like any other LVM, ASM manages a large number of physical volumes and submits them to Oracle as one or more logical volumes. The physical volume can be an actual disk or disk

An ASM disk is an ASM disk pool managed as a logical unit. Like any other LVM, ASM manages a large number of physical volumes and submits them to Oracle as one or more logical volumes. The physical volume can be an actual disk or disk

An ASM disk is an ASM disk pool managed as a logical unit. Like any other LVM, ASM manages a large number of physical volumes and submits them to Oracle as one or more logical volumes. A physical volume can be an actual disk or disk partition, or a volume belonging to the volume manager of the operating system. Either way, you cannot use any file system format. It must be a bare device.

On Linux, ASM can reference a disk as a bare device or use the ASMLib software.

  • Direct use of bare devices:

  • 1. You can directly use the rawdevices management method before RHEL6. After the system is installed, the/etc/init. d/rawdevices and/etc/sysconfig/rawdevices files exist by default.

    # Cat/etc/redhat-releaseRed Hat Enterprise Linux Server release 5.8 (Tikanga) # rpm-qf/etc/init. d/rawdevices/etc/sysconfig/rawdevicesinitscripts-8.45.42-1.el5initscripts-8.45.42-1.el5 # cat/etc/init. d/rawdevices #! /Bin/bash # rawdevicesThis shell script assignes rawdevices to block devices # chkconfig: 345 56 44 # description: this scripts assignes raw devices to block devices \ # (such as hard drive partitions ). this is for the use \ # of applications such as Oracle. you can set up the \ # raw device to block device mapping by editing \ # the file/etc/sysconfig/rawdevices. # config:/etc/sysconfig/rawdevices [-f/bi N/raw] | exit 0 [-f/etc/sysconfig/rawdevices] | exit 0 # Exit if the file just has the default comments. LC_ALL = C/bin/egrep-q-v "^ * #"/etc/sysconfig/rawdevices 2>/dev/null | exit 0. /etc/init. d/functionsfunction assign_raw () {LC_ALL = C egrep-v '^ * #'/etc/sysconfig/rawdevices | while read raw block; doif [-n "$ RAW"-a-n "$ BLOCK"]; thenrawdirname =$ {RAW %/*} if ["$ rawdirname" = "/dev"-a-d /Dev/raw]; thenecho $ "Please correct your/etc/sysconfig/rawdevices: "echo $" rawdevices are now located in the directory/dev/raw/"echo $" If the command 'Raw' still refers to/dev/raw as a file. "echo $" you'll have to upgrade your util-linux package "exit 0 fiif [" $ rawdirname "="/dev/raw "-a-f/dev/raw]; thenecho $ "Please correct your/etc/sysconfig/rawdevices:" echo $ "rawdevices are now loca Ted in the directory/dev/raw/"echo $" If the command 'Raw' still refers to/dev/raw as a file. "echo $" you'll have to upgrade your util-linux package "exit 0 fiecho" $ RAW --> $ BLOCK "; raw $ RAW $ BLOCKfidone} # See how we were called. case "$1" in start) # Assign devicesecho $ "Assigning devices:" assign_raw # Add the following two lines (which do not exist by default), that is, the raw device generated by default is owned by root, # Therefore, you must modify the owner. Otherwise, oracle users cannot use the bare device sleep 5 chown-R oracle: oinstall/dev. /Raw/echo $ "done"; stop) # No action to be taken here; status) ID = 'id-U' if [$ id-eq 0]; thenraw-qaelseecho $ "You need to be root to use this command! "Fi; restart | reload) $0 start; *) echo $" Usage: $0 {start | stop | status | restart} "exit 1 esacexit 0


    # Vi/etc/sysconfig/rawdevices // ing the raw device/dev/raw/raw10/dev/sda10/dev/raw/raw11/dev/sda11/dev/raw /raw12/dev/sda12/dev/raw/raw13/dev/sda13/dev/raw/raw14/dev/sda14 # chkconfig rawdevices on # service rawdevices startAssigning devices: /dev/raw/raw10 -->/dev/sda10/dev/raw/raw10: bound to major 8, minor 10/dev/raw/raw11 -->/dev/sda11/dev/raw/raw11: bound to major 8, minor 11/dev/raw/raw12 -->/dev/sda12/dev/raw/raw12: bound to major 8, minor 12/dev/raw/raw13 -->/dev/sda13/dev/raw/raw13: bound to major 8, minor 13/dev/raw/raw14 -->/dev/sda14/dev/raw/raw14: bound to major 8, minor 14 done # ls-l/dev/raw/total 0crw-rw ----. 1 oracle oinstall 162, 10 May 27 raw10crw-rw ----. 1 oracle oinstall 162, 11 May 27 raw11crw-rw ----. 1 oracle oinstall 162, 12 May 27 raw12crw-rw ----. 1 oracle oinstall 162, 13 May 27 raw13crw-rw ----. 1 oracle oinstall 162, 14 May 27 raw14crw-rw ----. 1 oracle oinstall 162, 0 May 27 rawctl # raw-qa/dev/raw/raw10: bound to major 8, minor 10/dev/raw/raw11: bound to major 8, minor 11/dev/raw/raw12: bound to major 8, minor 12/dev/raw/raw13: bound to major 8, minor 13/dev/raw/raw14: bound to major 8, minor 14


    2. in RHEL6, although the system does not have/etc/sysconfig/rawdevices and/etc/init. d/rawdevices file, but still supports rawdevices mode, website space, website space, you can manage raw files through the following method.

  • Manually create the/etc/sysconfig/rawdevices and/etc/init. d/rawdevices files.

  • You can use udev to manage raw data. You can also use udev to fix the device name of the disk.

  • The following describes how to use udev:

    # Fdisk-l/dev/sdbDisk/dev/sdb: 2147 MB, 2147483648 bytes255 heads, 63 sectors/track, 261 cylindersUnits = cylinders of 16065*512 = 8225280 bytesDevice BootStartEndBlocks Id System/dev/sdb112612096451 5 Extended/dev/sdb5125200749 + 83 Linux/dev/83 Linux/dev/83 Linux/ dev/sdb876100200781 83 Linux/dev/sdb9101125200781 83 Linux # vi/etc/udev/rules. d/60-raw.rulesACTION = "add", KERNEL = "sdb5", RUN + = "/bin/raw/dev/raw/raw5% N", OWNER = "oracle ", GROUP = "oinstall", MODE = "660" ACTION = "add", KERNEL = "sdb6 ", RUN + = "/bin/raw/dev/raw/raw6% N", OWNER = "oracle", GROUP = "oinstall ", MODE = "660" ACTION = "add", KERNEL = "sdb7", RUN + = "/bin/raw/dev/raw/raw7% N ", OWNER = "oracle", GROUP = "oinstall", MODE = "660" ACTION = "add", KERNEL = "sdb8 ", RUN + = "/bin/raw/dev/raw/raw8% N", OWNER = "oracle", GROUP = "oinstall ", MODE = "660" ACTION = "add", KERNEL = "sdb9", RUN + = "/bin/raw/dev/raw/raw9% N ", OWNER = "oracle", GROUP = "oinstall", MODE = "660" # raw-qa # start_udevStarting udev: [OK] # raw-qa/dev/raw/raw5: bound to major 8, minor 21/dev/raw/raw6: bound to major 8, minor 22/dev/raw/raw7: bound to major 8, minor 23/dev/raw/raw8: bound to major 8, minor 24/dev/raw/raw9: bound to major 8, minor 25 # ls-l/dev/rawtotal 0crw-rw ---- 1 oracle oinstall 162, 5 Jun 9 raw5crw-rw ---- 1 oracle oinstall 162, 6 Jun 9 raw6crw-rw ---- 1 oracle oinstall 162, 7 Jun 9 raw7crw-rw ---- 1 oracle oinstall 162, 8 Jun 9 raw8crw-rw ---- 1 oracle oinstall 162, 9 Jun 9 raw9


  • ASMLib: (non-Linux systems can only use bare devices)

  • ASMLib is an optional set of kernel driver tools between ASM and hardware. It also serves as an application library to access the ASM disk through Oracle database software.

    It is a single-instance database of Oracle 10g and 11g, and the ASM feature support database of RAC. ASM and database instances can use ASMLib as an alternative disk access interface.

    ASMLib has the following three components:

    Kernel Driver: oracle ASMLib kernel driver is supported in oracleasm Linux (download Based on kernel version)

    Supported tools: oracleasm-support provides a utility for configuring and starting the ASM driver.

    Application Library: oracleasmlib provides the actual ASM Library

    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.