ASM磁盘组是作为一个逻辑单元管理的一个ASM磁盘池。与其他任何LVM一样,ASM管理大量物理卷并将其作为一个或多个逻辑卷呈交给Oracle。物理卷可以是实际的磁盘或磁盘的分区,或者是隶属操作系统的卷管理器的卷。无论采用哪种方式,都不能使用任何文件系统格式化,必须是裸设备。在Linux上,ASM能引用磁盘作为裸设备,或通过使用ASMLib软件。直接使用裸设备的方法:
1. 在RHEL6以前的可以直接通过rawdevices的管理方法,系统安装后默认已存在/etc/init.d/rawdevices和/etc/sysconfig/rawdevices这两个文件。# 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## rawdevices This 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 /bin/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; do if [ -n "$RAW" -a -n "$BLOCK" ]; then rawdirname=${RAW%/*} if [ "$rawdirname" = "/dev" -a -d /dev/raw ]; then echo $" 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 fi if [ "$rawdirname" = "/dev/raw" -a -f /dev/raw ]; then echo $" 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 fi echo " $RAW --> $BLOCK"; raw $RAW $BLOCK fi done}# See how we were called.case "$1" in start) # Assign devices echo $"Assigning devices: " assign_raw#添加以下两行(默认不存在),即默认情况下生成的裸设备为root所有,#所以必须修改属主,否则oracle用户无法使用裸设备 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 ]; then raw -qa else echo $"You need to be root to use this command ! " fi ;; restart|reload) $0 start ;; *) echo $"Usage: $0 {start|stop|status|restart}" exit 1esacexit 0------------------------------------------------------
# vi /etc/sysconfig/rawdevices //映射将要绑定的裸设备/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 14done# ls -l /dev/raw/total 0crw-rw----. 1 oracle oinstall 162, 10 May 27 08:37 raw10crw-rw----. 1 oracle oinstall 162, 11 May 27 08:37 raw11crw-rw----. 1 oracle oinstall 162, 12 May 27 08:37 raw12crw-rw----. 1 oracle oinstall 162, 13 May 27 08:37 raw13crw-rw----. 1 oracle oinstall 162, 14 May 27 08:37 raw14crw-rw----. 1 oracle oinstall 162, 0 May 27 08:19 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
CentOS 6.3安装MySQL 5.6.10包冲突问题CentOS 6.3下MySQL主从复制笔记相关资讯 ASM ASM磁盘组
- Oracle 11g RAC 启动时无法识别ASM (今 15:36)
- RAC共享磁盘物理路径故障导致OCR、 (04月10日)
- ASM学习之概述 (01月12日)
| - Oracle Linux6.7下使用udev做ASM (07月04日)
- 监控ASM磁盘组IO吞吐量 (04月10日)
- Win远程Linux下的ASM实例 (01月12日)
|
本文评论 查看全部评论 (0)