首页 > 代码库 > Device "/dev/sdg" is not a partition【再续】
Device "/dev/sdg" is not a partition【再续】
之前创建asm磁盘的时候总结过一下错误:http://blog.csdn.net/rhys_oracle/article/details/17029333
当今天情况是这样的。如下:
在使用openfiler通过iSCSI映射到本地,发现将整个磁盘创建为asm提示如下错误:
[root@rac1 iscsi]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdhMarking 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 partitionDevice "/dev/sdh" is not a partitionDevice "/dev/sdh" is not a partition[root@rac1 iscsi]#
提示不是一个分区。这是为什么呢?
因为:挂载到本地的iSCSI磁盘一定要分区后再使用,而且分区一定要是主分区。如果挂载的单张磁盘大于2TB,使用parted工具创建分区(fdisk不支持在大于2.2TB的磁盘上创建分区)。
重新分区:
[root@rac1 iscsi]# fdisk /dev/sdhDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding 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): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 1First cylinder (1-10240, default 1): Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-10240, default 10240): Using default value 10240Command (m for help): wThe 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/sdh1Marking disk "VOL1" as an ASM disk: [ OK ][root@rac1 iscsi]#
Device "/dev/sdg" is not a partition【再续】
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。