So, I'm pulling my hair out over this... when I try to create a datastore on a HDD in the vSphere Client, I get the following error:
So, I went ahead and tried the web GUI, and got the same error, roughly. After doing some research on the web, I found that it might have something to do with the fact that the partition format comes up as "unknown" in the vSphere Client. So that led me to going in via SSH, and using partedUtil. I felt like I ended up going in circles.
First I ran a command to see what I was looking at with my HDD:
[root@localhost:/dev/disks] partedUtil getptbl t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
unknown
19929 255 63 320173056
Then, I found that I should try to change the label of the partition:
[root@localhost:/dev/disks] partedUtil mklabel t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________ msdos
Error: Input/output error during read on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Error: Input/output error during read on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Error: Input/output error during write on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
WriteNewPtable: Unable to commit to device t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
So, then I found that I would need to run a setptbl command:
[root@localhost:/dev/disks] partedUtil setptbl t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________ msdos
msdos
0 0 0 0
Error: Input/output error during read on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Error: Input/output error during read on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Error: Input/output error during write on /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
WriteNewPtable: Unable to commit to disk
So, I tried to delete the partition to start over:
[root@localhost:/dev/disks] partedUtil delete t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________ 1
Error: /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________: unrecognised disk label
Unable to construct disk from device t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Then I felt like I was going in circles. I could not get fdisk to run on it because the disk wasn't showing up in the list for it, and that any gpt partitions needed to be handled by partedUtil. So, I dug deep on the internet and found a gparted live disk that had fdisk in it. I booted the machine into that, and tried to work on this Maxtor drive. I ran through this walkthrough to try to get the drive ready for VMware with fdisk:
Manually creating a VMFS volume using vmkfstools -C (1009829) | VMware KB
It ended up finishing right, and I even was able to see that the type was changed to VMFS. So, I went back to ESXi, Putty'd in, and did the vmkfstools command for vmfs5, and got the following:
[root@localhost:/dev/disks] vmkfstools -C vmfs5 -b 1m -S TheOASIS /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
create fs deviceName:'/dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________', fsShortName:'vmfs5', fsName:'TheOASIS'
deviceFullPath:/dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________ deviceFile:t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________
Unknown partition type on device 't10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________'
Error reading header from device /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________: Error
Failed to check device /dev/disks/t10.ATA_____Maxtor_6Y160M0__________________________Y48XD3AE____________ capable of ATS
Usage: vmkfstools -C [vmfs5|vmfs6|vfat] /vmfs/devices/disks/vml... or,
vmkfstools -C [vmfs5|vmfs6|vfat] /vmfs/devices/disks/naa... or,
vmkfstools -C [vmfs5|vmfs6|vfat] /vmfs/devices/disks/mpx.vmhbaA:T:L:P
Error: Unable to access device, please check your connection to the device.
Anyone have any ideas on where to go next?
Oh, and I re-ran those same commands from before, and I get the exact same results, and nothing has changed within the vSphere client as far as disk label. Lastly, this disk was used as a spare data disk in a Windows 10 machine prior to this.
I fixed it! Thank you to /u/PTCruiserGT over on Reddit for the tip!
I ran the following to disable the native AHCI drivers:
esxcli system module set --enabled=false --module=vmw_ahci
Then I rebooted, and I was able to create the datastore!
I fixed it! Thank you to /u/PTCruiserGT over on Reddit for the tip!
I ran the following to disable the native AHCI drivers:
esxcli system module set --enabled=false --module=vmw_ahci
Then I rebooted, and I was able to create the datastore!