之前创建asm磁盘的时候总结过一下错误:http://blog.csdn.net/rhys_oracle/article/details/17029333
当今天情况是这种。例如以下:
在使用openfiler通过iSCSI映射到本地,发现将整个磁盘创建为asm提演示样例如以下错误:
[root@rac1 iscsi]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdh
Marking disk "VOL1" as an ASM disk: [FAILED]
[root@rac1 iscsi]# tail -5 /var/log/oracleasm
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Device "/dev/sdg" is not a partition
Device "/dev/sdh" is not a partition
Device "/dev/sdh" is not a partition
[root@rac1 iscsi]#
提示不是一个分区。这是为什么呢?
由于:挂载到本地的iSCSI磁盘一定要分区后再使用,并且分区一定要是主分区。假设挂载的单张磁盘大于2TB,使用parted工具创建分区(fdisk不支持在大于2.2TB的磁盘上创建分区)。
又一次分区:
[root@rac1 iscsi]# fdisk /dev/sdh
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xcf1af59a.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-10240, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-10240, default 10240):
Using default value 10240
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@rac1 iscsi]#
又一次创建asm磁盘:
[root@rac1 iscsi]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdh1
Marking disk "VOL1" as an ASM disk: [ OK ]
[root@rac1 iscsi]#