一、环境
OS:
[root@yitai ~]# lsb_release --all
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Release: 4
Codename: NahantUpdate7
[root@yitai ~]#
[root@yitai ~]# uname -r
2.6.9-78.ELsmp
RDBMS:
[oracle@yitai ~]$ sqlplus -version
SQL*Plus: Release 10.2.0.4.0 - Production
oracleasm :
[oracle@yitai ~]$ oracleasm --version
oracleasm version 2.1.7
软件包:
[root@yitai ~]# ls -l
-rw-r--r-- 1 root root 134679 Aug 27 12:38 oracleasm-2.6.9-78.ELsmp-2.0.5-1.el4.i686.rpm
-rw-r--r-- 1 root root 13105 Aug 27 12:46 oracleasmlib-2.0.4-1.el4.i386.rpm
-rw-r--r-- 1 root root 83636 Aug 27 12:46 oracleasm-support-2.1.7-1.el4.i386.rpm
二、修改之前显示格式:
[oracle@yitai ~]$ /etc/init.d/oracleasm listdisks
total 0
M512_1
M512_2
M512_3
VOL1
VOL2
VOL3
VOL4
[oracle@yitai ~]$ /etc/init.d/oracleasm querydisk VOL1
Disk "VOL1" is a valid ASM disk .
三、修改/etc/init.d/oracleasm脚本:
[root@yitai ~]# ls /etc/init.d/oracleasm -l
-rwxr-xr-x 1 root root 7311 Aug 30 07:28 /etc/init.d/oracleasm
[root@yitai ~]# vi /etc/init.d/oracleasm
listdisks)
# "${ORACLEASM}" listdisks -l "${ORACLE_ASMMANAGER}"
# ;;
if [ -d "${ORACLE_ASMMANAGER}/disks" ]
then
ls -l "${ORACLE_ASMMANAGER}/disks"
fi
#echo "\${ORACLE_ASMMANAGER} = ${ORACLE_ASMMANAGER}"
;;
querydisk)
shift
"${ORACLEASM}" querydisk -l "${ORACLE_ASMMANAGER}" -d "$@"
;;
四、修改之后显示格式:
[root@yitai ~]# /etc/init.d/oracleasm listdisks
total 0
brw-rw---- 1 oracle dba 8, 81 Aug 30 06:07 M512_1
brw-rw---- 1 oracle dba 8, 97 Aug 30 06:07 M512_2
brw-rw---- 1 oracle dba 8, 113 Aug 30 06:07 M512_3
brw-rw---- 1 oracle dba 8, 17 Aug 30 06:07 VOL1
brw-rw---- 1 oracle dba 8, 33 Aug 30 06:07 VOL2
brw-rw---- 1 oracle dba 8, 49 Aug 30 06:07 VOL3
brw-rw---- 1 oracle dba 8, 65 Aug 30 06:07 VOL4
[root@yitai ~]# /etc/init.d/oracleasm querydisk VOL1
Disk "VOL1" is a valid ASM disk on device /dev/sdb1[8,17]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27042095/viewspace-742331/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27042095/viewspace-742331/