Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1908622
  • 博文数量: 346
  • 博客积分: 10221
  • 博客等级: 上将
  • 技术积分: 4079
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-01 19:43
文章分类

全部博文(346)

文章存档

2012年(1)

2011年(102)

2010年(116)

2009年(127)

我的朋友

分类:

2010-10-21 15:02:56

Today I wanted to add a new iSCSI Lun to my vSphere Lab. I got the following error:

image

I had this error in the past, see my previous post: . I tried the solution described in my previous post but it didn’t  work in vSphere.

So I had to search for another solution. Luckily VMware released a KB document. See . In this KB document VMware uses the command esxcfg-vmhbadevs. This command is replaced with a new command called esxcfg-scsidevs.

So I ran the esxcfg-scsidevs command on the service console:

image

After running the command, write down the following line: Console Device: /dev/sdc. Start Parted and walk through the following steps.

Note: don’t forget to change the /dev/sdb to the device you need to fix. In my case /dev/sdc.

To change the label and partitioning scheme:

Caution: This removes the pre-existing partition table, and any data on the volume is no longer be available. Ensure you are operating against the correct disk.

  1. Start parted to analyze the existing partition. Print the existing partition information, taking note of the Partition Table, size, and name. Ensure this is the data intended to be removed. 
    Run the following commands: 
    [root@esx ~]# parted /dev/sdb 
    GNU Parted 1.8.1 
    Using /dev/sdb 
    Welcome to GNU Parted! Type ‘help’ to view a list of commands. 
    (parted) print 
    Disk geometry for /dev/sdb: 0.000-512.000 megabytes 
    Disk label type: gpt 
    Number  Start   End    Size   File system  Name                          Flags  
    1      17.4kB  134MB  134MB               Microsoft reserved partition  msftres
  2. Change the partition table (disklabel) type to msdos. This deletes the pre-existing partitions. Print the partition table again to observe the changes. Quit parted. 
    Run the following commands: 
    (parted) mklabel msdos 
    (parted) print 
    Disk geometry for /dev/sdb: 0.000-512.000 megabytes 
    Disk label type: msdos 
    Minor    Start       End     Type      Filesystem  Flags 
    (parted) quit
  3. Return to the VI Client and use the Add Storage wizard again. Choose the same LUN, create a new partition, and format it with a VMFS Datastore as normal.
阅读(2495) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~