During a test I used an old disk that has been previously used by Virtual SAN. The disk did not appear during the datastore creation process. I miss a flash drive here:
The problem is that the disk has not been cleared from it's VSAN configuration. It has still valid VSAN partitions, so the ESXi "claims it for VSAN" what makes it impossible to create a VMFS filesystem.
To verify, connect to the ESXi with SSH and run esxcli vsan storage list:
[root@esx1:~] esxcli vsan storage list t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ Device: t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ Display Name: t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ Is SSD: true VSAN UUID: 523e54f5-9014-8421-d353-4d7a78d777f3 VSAN Disk Group UUID: 523e54f5-9014-8421-d353-4d7a78d777f3 VSAN Disk Group Name: t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ Used by this host: true In CMMDS: false Checksum: 13422576951459625586 Checksum OK: true Emulated DIX/DIF Enabled: false
You can also see a VSAN Partition with partedUtil getptbl /dev/disks/[disk]:
[root@esx1:~] partedUtil getptbl /dev/disks/t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ gpt 7783 255 63 125045424 1 2048 6143 381CFCCC728811E092EE000C2911D0B2 vsan 0 2 6144 125045390 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
To remove the disk from VSAN, use esxcli vsan storage remove [-d|-s] [Name] with an appropriate parameter:
-d for Disks
-s for Flash Drives
[root@esx1:~] esxcli vsan storage remove -s t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________
Verify Partitions (gone):
[root@esx1:~] partedUtil getptbl /dev/disks/t10.ATA_____SanDisk_SDSSDP064G______________________132444400028________ gpt 7783 255 63 125045424
You can now create a VMFS Datastore on the disk: