一、 檢查從存儲以多路徑方式劃分過來的磁盤
ls /dev/mapper
其中沒有p1結尾的磁盤爲未分區磁盤。
二、 對未分區磁盤進行格式化
# fdisk /dev/mapper/mpath9Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.The number of cylinders for this disk is set to 13054.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2 FDISK)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m for help): nCommand actione extendedp primary partition (1-4)pPartition number (1-4): 1First cylinder (1-13054, default 1):Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-13054, default 13054):Using default value 13054Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 22: Invalid argument.The kernel still uses the old table.The new table will be used at the next reboot.Syncing disks.
三、修改以下文件,在文件結尾添加如下信息(RAC環境兩個節點都需要修改)
vi /etc/sysconfig/rawdevices# raw device bindings# format: <rawdev> <major> <minor># <rawdev> <blockdev># example: /dev/raw/raw1 /dev/sda1# /dev/raw/raw2 8 5#crs/dev/raw/raw1 /dev/mapper/mpath2p1/dev/raw/raw2 /dev/mapper/mpath3p1#vote/dev/raw/raw3 /dev/mapper/mpath4p1/dev/raw/raw4 /dev/mapper/mpath5p1/dev/raw/raw5 /dev/mapper/mpath6p1#data/dev/raw/raw6 /dev/mapper/mpath0p1/dev/raw/raw7 /dev/mapper/mpath1p1/dev/raw/raw8 /dev/mapper/mpath8p1#new disk 20130411/dev/raw/raw9 /dev/mapper/mpath9p1/dev/raw/raw10 /dev/mapper/mpath10p1/dev/raw/raw11 /dev/mapper/mpath11p1
四、修改以下文件,在文件結尾添加如下信息(RAC環境兩個節點都需要修改)
五、將新增裸設備加入ASM磁盤組# vi /etc/rc.local#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don't# want to do the full Sys V style init stuff.touch /var/lock/subsys/localchown root:oinstall /dev/raw/raw1chown root:oinstall /dev/raw/raw2chown oracle:oinstall /dev/raw/raw3chown oracle:oinstall /dev/raw/raw4chown oracle:oinstall /dev/raw/raw5chown oracle:oinstall /dev/raw/raw6chown oracle:oinstall /dev/raw/raw7chown oracle:oinstall /dev/raw/raw8#new raw 20130411chown oracle:oinstall /dev/raw/raw9chown oracle:oinstall /dev/raw/raw10chown oracle:oinstall /dev/raw/raw11
oracle用戶下執行
$ export ORACLE_SID=+ASM1$ sqlplus / as sysdbaSQL> select name from v$asm_disk;NAME--------------------------------------------------------------------------------ORADATA_0002ORADATA_0001ORADATA_0000SQL> alter diskgroup ORADATA add disk '/dev/raw/raw9';Diskgroup altered.SQL> alter diskgroup ORADATA add disk '/dev/raw/raw10';Diskgroup altered.SQL> alter diskgroup ORADATA add disk '/dev/raw/raw11';Diskgroup altered.SQL> select name from v$asm_disk;NAME--------------------------------------------------------------------------------ORADATA_0005ORADATA_0004ORADATA_0003ORADATA_0002ORADATA_0001ORADATA_0000SQL> SELECT NAME,TOTAL_MB,FREE_MB FROM V$ASM_DISKGROUP;NAME--------------------------------------------------------------------------------TOTAL_MB FREE_MB---------- ----------ORADATA614388 597610
如果環境爲oracle 11g RAC的話,可以使用ASMCA進行磁盤組的修改和創建。