Tuesday, February 3, 2015

Create asm disk

# fdisk /dev/sdb
n
p
1
enter
t
8e
w
# fdisk -l  /dev/sdb
/dev/sdb1
# /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
# /etc/init.d/oracleasm listdisks
ASMDISK1
ASMDISK2
# /etc/init.d/oracleasm createdisk ASMDISK3 /dev/sdb1
Marking disk "ASMDISK3" as an ASM disk:                    [  OK  ]
# /etc/init.d/oracleasm listdisks
ASMDISK1
ASMDISK2
ASMDISK3
#
# /etc/init.d/oracleasm scandisks
# /etc/init.d/oracleasm listdisks

# /etc/init.d/oracleasm createdisk ASMDISK150 /dev/mapper/ASMDISK150
# /etc/init.d/oracleasm listdisks
# dd if=/dev/mapper/ASMDISK50R10 bs=1024 count=1 | od –c

Find ASM disk size
# lvs
# fdisk -l
# multipath -ll | more
# multipath -ll | grep -A 1 ASMDISK
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//' | grep ASM
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//' | grep ASM
ASMDISK18 [size=101G]
ASMDISK20 [size=101G]
ASMDISK17 [size=101G]
ASMDISK16 [size=101G]
ASMDISK14 [size=101G]
ASMDISK12 [size=101G]
ASMDISK11 [size=101G]
ASMDISK10 [size=101G]
ASMDISK06 [size=101G]
ASMDISK05 [size=101G]
ASMDISK19 [size=101G]
ASMDISK21 [size=101G]
#
===============
Oracle ASM log
===============
To send log to oracle to further analyse the issue
As an admin/root, perform the following. :
ssh oracledbserver 
# script /tmp/asm_details.txt
# hostname
-- oracledbserver:/opt/oracle/diag/asm/+asm/+ASM2/trace>fgrep + /etc/oratab
+ASM2:/opt/grid:N
# . oraenv
-- Type ASM2 depending on the following output
# lsmod|grep oracleasm
# modinfo oracleasm
# /etc/init.d/oracleasm listdisks
# /etc/init.d/oracleasm status
# /sbin/blkid | grep oracleasm
# /etc/init.d/oracleasm listdisks | xargs /etc/init.d/oracleasm querydisk -d
# /usr/sbin/oracleasm-discover
# exit


Discovered disk: ORCL:ASMSYS02 [4224000 blocks (2162688000 bytes), maxio 256]
Discovered disk: ORCL:ASMSYS03 [4224000 blocks (2162688000 bytes), maxio 256]
# cd /opt/oracle/diag/asm/+asm/+ASM2/trace
# . oraenv
ORACLE_SID = [root] ?
# ps -ef | grep -i pmon
oracle    1726     1  0 10:01 ?        00:00:00 asm_pmon_+ASM2
root      3437 28388  0 12:06 pts/11   00:00:00 grep -i pmon
oracle   12197     1  0 10:16 ?        00:00:02 ora_pmon_ECVPDB2
oracle   15498     1  0 10:18 ?        00:00:02 ora_pmon_ARRPDB2
oracle   16272     1  0 10:19 ?        00:00:01 ora_pmon_ADVOESP2
# . oraenv
ORACLE_SID = [root] ? +ASM2

 

No comments:

Post a Comment