After putting some local storage in a ESXi hosts for VSAN, I noticed not all local disks were showing up in the vSphere Webclient:
ESXi will only show local disks without any data on the disks. The existence of a previous VSAN configuration, a VMFS volume or other non-VMware data can result in local disks not showing up on this configuration page. Deleting a VMFS is pretty straight forward, deleting non-VMware data asks for a different approach.
Duncan Epping already posted an article which explains how to wipe your disks using Gparted – in this case you have to reboot your ESXi host. Another option is to wipe the disks using tooling available in the ESXi console. In this case we will use esxcli and fdisk. Let’s see how this works:
Wipe you disks straight from the ESXi console
First determine which disks are available to ESXi. You can use esxcli and/or fdisk for this:
esxcli storage nmp device list
and/or:
fdisk -l
Use these commands to identify the disks that are unavailable to VSAN but are available to your ESXi server. It’s extremely important that you correctly identify the local disks that contain garbage data. Use the LUN ID and SATP type for this:
The next step is to wipe the disk(s). This process is of course one-way only, so verify your wiping the correct volumes.
You can use fdisk for this (insert the naa ID of the disk to be wiped):
fdisk /dev/disks/naa.600508b1001037383941424344451400 Command (m for help): o (create a new empty DOS partition table) Command (m for help): w (write table to disk and exit)
Repeat this procedure for all disks you want to wipe. Run a rescan on your local disk controller; the local disks will now show up in the vSphere webclient:
You can now continue the configuration of VSAN.
Kudos to Martijn Moret (@mmmoret) of dataprotection.nu for the tip!
4 Comments
Pingback: Welcome to vSphere-land! » VSAN Links
Brandon
Thank You. This helped me very much.
viktorious
You’re welcome. Note that with the more recent versions of vSAN you can also execute this action through the GUI. Good luck!
Gregory
I have a similar error message – Error: The primary GPT table on ‘/dev/disks/naa.600508b1001cb16c5ce9ca17af8a963c’ is OK, but secondary is corrupt. Fix secondary table? This will move secondary at the end in case it is not at the end already. It will also set LastUsableLBA to use all the space at the end. diskSize (468751200) AlternateLBA (234371519) LastUsableLBA (234371486)