分类:
2010-10-21 15:02:56
Today I wanted to add a new iSCSI Lun to my vSphere Lab. I got the following error:
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:
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.
- 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- 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- 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.