日期:2014-05-16 浏览次数:20445 次
oracleasm刚开始使用,有些地方没明白,例如如何创建磁盘。
?
我先看一下帮助
[root@db3 ~]# oracleasm createdisk -h
Usage: oracleasm-createdisk [-l <manager>] [-v] <label> <device>
?
?
根据帮助,我这样操作的
[root@db3 ~]# /etc/init.d/oracleasm createdisk /dev/sdb2 VOL2
Marking disk "/dev/sdb2" as an ASM disk: [FAILED]
?
创建失败,检查错误日志文件:
[root@db3 ~]# tail -f /var/log/oracleasm
Validating disk "VOL1"
Scanning system for ASM disks...
Disk "VOL1" is a valid ASM disk
oracleasm-read-label: Unable to read device "/dev/sdd": Input/output error
oracleasm-read-label: Unable to read device "/dev/sdf": Input/output error
oracleasm-read-label: Unable to read device "/dev/sdi": Input/output error
oracleasm-read-label: Unable to read device "/dev/sdi1": Input/output error
oracleasm-read-label: Unable to read device "/dev/sdk": Input/output error
oracleasm-read-label: Unable to read device "/dev/sdk1": Input/output error
Disk label "/dev/sdb2" contains an invalid character
:q!
?
日志告诉我: "/dev/sdb2" 含有无效的字符。
实在没明白。
?
怎么解决呢?
我做了一系列操作:
[root@db3 ~]# dd if=/dev/zero of=/dev/sdb2
408655+0 records in
408655+0 records out
209231360 bytes (209 MB) copied, 9.65437 seconds, 21.7 MB/s
[root@db3 ~]# oracleasm createdisk /dev/sdb2 VOL2
Disk label "/dev/sdb2" contains an invalid character
?
还是报同样的错误。
?
[root@db3 ~]# /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [? OK? ]
[root@db3 ~]# /etc/init.d/oracleasm createdisk /dev/sdb2 VOL2
Marking disk "/dev/sdb2" as an ASM disk: [FAILED]
[root@db3 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver.? The following questions will determine whether the driver is
loaded on boot and what permissions it will have.? The current values
will be shown in brackets ('[]').? Hitting <ENTER> without typing an
answer will keep that current value.? Ctrl-C will abort.
Default user to own the driver interface [oracle]:
Default group to own the driver interface [dba]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [? OK? ]
Scanning the system for Oracle ASMLib disks: [? OK? ]
?
还是失败。
?
到最后了,实在不行了。google了一下。
?
发现错误居然是这样:
[root@db3 ~]# /etc/init.d/oracleasm createdisk? VOL2 /dev/sdb2
Marking disk "VOL2" as an ASM disk: [? OK? ]
?
真是无语,那个帮助害死人。