Skip to content

Identify and solve ineligible disk problems in Virtual SAN

During VMware Virtual SAN (vSAN) installation on old reused hardware I noticed that there was no eligible data disk available. I can't claim the disks for vSAN or create a disk group. There was no further information on why the data disks are not eligible. Thanks to the vSAN troubleshooting commands provided by RVC (Ruby vSphere Console) I could find and solve the reason quite quick.

vsan-no-eligible-data-disk

RVC is available on both, the vCenter Server Appliance and the Windows version:

Windows based vCenter
Start -> Run -> %PROGRAMFILES%\VMware\Infrastructure\VirtualCenter Server\support\rvc\rvc.bat

vCenter Server Appliance
vc:~ # rvc root@localhost

Use the vsan.disks_info <HOST> command to find out why the this are ineligible:

/localhost/Hamburg> vsan.disks_info ~/computers/Home/hosts/esx1.virten.lab/

vsan-ineligible-disk

State: ineligible (Existing partitions found on disk [DISK].)

That is the reason why the disk can not be claimed: There are old partitions and/or VMFS volumes. To be eligible for vSAN the disk has to be empty. You have to delete all VMFS datastores and partitions.

VMFS Datastores can be easily deleted with the vSphere Client. Just open the ESXi configuration page, right-click the Datastore and select Delete:
delete-vmfs-datastore

To remove old Windows or Linux partitions, you have to SSH to the ESXi Host and delete all partitions by using the partedUtil command. Be careful with that, as you do not want to delete the wrong partition!

First you have to identify the disks that you want to use for vSAN. The disks name is issued in the previously used RVC command (The distorted output is cause by the long disk names ):
identify-disk-name

The part between the brackets is the disk name you need for partedUtil:
t10.ATA_____VB0250EAVER_____________________________Z2AFGKFP____________

You can also identify disks and partitions from the ESXi console:

~ # ls -l /dev/disks/

Use partedUtil get "/dev/disks/<DISK>" to list all partitions:

~ # partedUtil get /dev/disks/t10.ATA_____VB0250EAVER_____________________________Z2AFGKFP____________
36481 255 63 586072368
1 2048 206847 7 128
2 206848 586070015 7 0

partetutil-get-partitions

This disk has 2 partitions. Use the partedUtil delete "/dev/disks/<DISK>" <PARTITION> command to delete all partitions:

~ # partedUtil delete "/dev/disks/t10.ATA_____WDC_WD3000HLFS2D01G6U1________________________WD2DWX51C1018810" 1
~ # partedUtil delete "/dev/disks/t10.ATA_____WDC_WD3000HLFS2D01G6U1________________________WD2DWX51C1018810" 2

If there is an active VMFS datastore or the disk is configured with a Coredump location, you get an error message stating that this is partition is read-only. In that case, delete the Datastore and disable Coredump.

Error: Read-only file system during write on <DISK>

Sometimes, you can't delete partitions. In that case, you can try to use the following command:

~ # dd if=/dev/zero of="/dev/disks/<DISK>" bs=512 count=34 conv=notrunc

When all partitions are removed, do a rescan:

~ # esxcli storage core adapter rescan --all

Back to RVC, verify that all disks you want to use for vSAN are eligible. When disks are not eligible despite there are no listed partitions, you have to do a rescan.

/localhost/Hamburg> vsan.disks_info ~/computers/Home/hosts/esx1.virten.lab/

rvc-vsan-disk-info

You can now start to create your Virtual SAN Cluster.

1 thought on “Identify and solve ineligible disk problems in Virtual SAN”

  1. Pingback: Identify and solve ineligible disk problems in Virtual SAN - VSAN Me!

Leave a Reply

Your email address will not be published. Required fields are marked *