今天创建ASM磁盘报错,如下:
[root@db1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/asmc1
Marking disk "VOL2" as an ASM disk: [FAILED]
因为使用了udev,以前又配置过 Multipathing 多路径模块,初步怀疑是 Multipathing 的问题,停止服务,注释掉配置文件,重新加载配置和重新启动系统,问题依旧。
怀疑是udev的问题,尝试使用内核设备名,问题依旧。
google一下,记起asm是有日志的,检查日志(tail -f /var/log/oracleasm) 发现如下报错:
Disk "VOL1" does not exist or is not instantiated
Writing disk header: oracleasm-write-label: Unable to clear device "/dev/asma1": No space left on device
failed
Unable to label device "/dev/asma1"
新设备怎么会没有空间呢?也不会是Inode的问题,再次使用fdisk检查,突然发现分区类型是扩展分区:
[root@db1 ~]# fdisk /dev/asma
Command (m for help): p
Disk /dev/asma: 5268 MB, 5268045824 bytes
163 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10106 * 512 = 5174272 bytes
Device Boot Start End Blocks Id System
/dev/ocrb1 10 1018 5143923 83 Extended
改成主磁盘分区
Disk /dev/asma: 5268 MB, 5268045824 bytes
163 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 10106 * 512 = 5174272 bytes
Device Boot Start End Blocks Id System
/dev/asma1 1 1018 5143923 83 Linux
重新尝试,创建asm磁盘成功,看来是上一步做磁盘分区时疏忽了,做个mark。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14184018/viewspace-702153/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/14184018/viewspace-702153/