[root@linux Packages]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [FAILED]
[root@linux Packages]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@linux Packages]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [FAILED]
[root@linux Packages]# cd /var/log/
[root@linux log]# cat oracleasm
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Disk "ASM1" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "ASM1": Permission denied
failed
Clearing disk header: done
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Disk "ASM1" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "ASM1": Permission denied
failed
Clearing disk header: done
[root@linux log]# getenforce
Enforcing
[root@linux log]# setenforce 0
[root@linux log]# cat /etc/sysconfig/selinux
# 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=enforcing
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
出现这个需要将selinux disable掉
[root@linux log]# vi /etc/selinux/config
# 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=disable
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
这个需要重启才能生效,如果需要立即生效,需执行
[root@linux ~]# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
[root@linux ~]# setenforce 0
[root@linux log]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [ OK ]