[[email protected] Packages]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [FAILED]
[[email protected] 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 ]
[[email protected] Packages]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [FAILED]
[[email protected] Packages]# cd /var/log/
[[email protected] 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
[[email protected] log]# getenforce
Enforcing
[[email protected] log]# setenforce 0
[[email protected] 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掉
[[email protected] 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
这个需要重启才能生效,如果需要立即生效,需执行
[[email protected] ~]# setenforce
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
[[email protected] ~]# setenforce 0
[[email protected]nux log]# /etc/init.d/oracleasm createdisk asm1 /dev/sdg1
Marking disk "asm1" as an ASM disk: [ OK ]