Adding ‘unclean’ drive to ESXi

Adding some older hard drive from refurbished laptop to my lab ESXi host, I followed the usual steps, Configuration/Storage/Add Storage, format as VMFS-5. The drive was recognized, everything looked hunky dory, till the following error appear in the end.

Vim.Host.DiskPartitionInfo.Spec
Call "HostStorageSystem.ComputeDiskPartitionInfo" for object "storageSystem"

datastore1The reason is that the disk held an existing windows installation with multiple partitions, and ESXi did not like that. You need to manuallky delete the partitions and this can be done from ESXi CLI. Jump on DCUI or temporaty enable SSH at Configuration/Security Profile/Services.

~ # esxcfg-scsidevs -l
t10.ATA_____OCZ2DVERTEX4_____________________________OCZ2D4158A721RE3N09L2
Device Type: Direct-Access
Size: 122104 MB
Display Name: Local ATA Disk (t10.ATA_____OCZ2DVERTEX4_____________________________OCZ2D4158A721RE3N09L2)
Multipath Plugin: NMP
Console Device: /vmfs/devices/disks/t10.ATA_____OCZ2DVERTEX4_____________________________OCZ2D4158A721RE3N09L2
Devfs Path: /vmfs/devices/disks/t10.ATA_____OCZ2DVERTEX4_____________________________OCZ2D4158A721RE3N09L2
Vendor: ATA       Model: OCZ-VERTEX4       Revis: 1.5
SCSI Level: 5  Is Pseudo: false Status: on
Is RDM Capable: false Is Removable: false
Is Local: true  Is SSD: true
Other Names:
vml.01000000004f435a2d34313538413732315245334e30394c324f435a2d5645
VAAI Status: unknown
t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M
Device Type: Direct-Access
Size: 476940 MB
Display Name: Local ATA Disk (t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M)
Multipath Plugin: NMP
Console Device: /vmfs/devices/disks/t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M
Devfs Path: /vmfs/devices/disks/t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M
Vendor: ATA       Model: ST500LT012-9WS14  Revis: 0001
SCSI Level: 5  Is Pseudo: false Status: on
Is RDM Capable: false Is Removable: false
Is Local: true  Is SSD: false
Other Names:
vml.0100000000202020202020202020202020573056393935344d53543530304c
VAAI Status: unknown

The disk that is in question is second 500GB Non-SSD HDD (ST500LT012-9WS14) which is located at:

~ # partedUtil get /dev/disks/t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M
60801 255 63 976773168
1 2048 718847 7 128
2 718848 976771071 7 0

To delete the two exiting partitions, use the following comamnds.


~ # partedUtil delete /dev/disks/t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M 1
~ # partedUtil delete /dev/disks/t10.ATA_____ST500LT0122D9WS142___________________________________W0V9954M 2

Now going back to the process at the begining, adding new VMFS datastore is successfull.

datastore2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s