码迷,mamicode.com
首页 > 其他好文 > 详细

Device "/dev/sdg" is not a partition【再续】

时间:2014-10-10 21:09:04      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:blog   http   io   os   使用   ar   for   strong   sp   

之前创建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]# 


 

Device "/dev/sdg" is not a partition【再续】

标签:blog   http   io   os   使用   ar   for   strong   sp   

原文地址:http://blog.csdn.net/rhys_oracle/article/details/39965421

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!