Problem Description
“oracleasm configure” works fine but whenever it is tried to create disk for ASM using createdisk command it fails like below.
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1 Creating Oracle ASM disk "VOL1" [FAILED]
Running createdisk with strace show the device /dev/sdc1 is busy
# strace -f /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1 ... 19543 open("/dev/sdc1", O_RDWR|O_EXCL) = -1 EBUSY (Device or resource busy) ... 19543 write(2, "Unable to open device "/dev/sdc1"..., 59 >unfinished ...< ... 19527 write(1, "FAILED", 6) = 6
Cause of the Problem
The device in question (/dev/sdc1) is already mounted on a directory.
# mount | grep sdc1 /dev/sdc1 on /mnt type ext3 (rw)
Solution of the Problem
1. Unmount the device /dev/sdc1 and make sure it is not mounted anymore.
# umount /dev/sdc1 # mount | grep sdc1
2. Retry createdisk:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1 Creating Oracle ASM disk "VOL1" [ OK ]