The today error was:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk: [FAILED]
What is the reason for [FAILED] ?
The disks are:
# ls -l /dev/sdb*
brw-rw----. 1 root disk 8, 16 Mar 19 11:47 /dev/sdb
brw-rw----. 1 root disk 8, 17 Mar 19 11:58 /dev/sdb1
The solution is DISABLE SELINUX !
The dot in the brw-rw----. <- is the symptom of selinux.
After SELINUX=disabled in /etc/selinux/config +reboot the server we have
# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Mar 19 13:52 /dev/sdb
brw-rw---- 1 root disk 8, 17 Mar 19 14:01 /dev/sdb1
and oracleasm configuration works:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk: [FAILED]
What is the reason for [FAILED] ?
The disks are:
# ls -l /dev/sdb*
brw-rw----. 1 root disk 8, 16 Mar 19 11:47 /dev/sdb
brw-rw----. 1 root disk 8, 17 Mar 19 11:58 /dev/sdb1
The solution is DISABLE SELINUX !
The dot in the brw-rw----. <- is the symptom of selinux.
After SELINUX=disabled in /etc/selinux/config +reboot the server we have
# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Mar 19 13:52 /dev/sdb
brw-rw---- 1 root disk 8, 17 Mar 19 14:01 /dev/sdb1
and oracleasm configuration works:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@oracle-one ~]# cat /etc/selinux/config
ReplyDelete# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
SELinux represents the security enhanced Linux, three value enforcing log and stop running, permissive records the alert log allow the program to run, disable to close the SELinux strategy. It is recommended to set permisssive.
[root@oracle-one ~]#
[root@oracle-one ~]# setenforce 0
[root@oracle-one ~]# getenforce
Permissive
[root@oracle-one ~]#
[root@oracle-one ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@oracle-one ~]#