We have a Dell FX2 blade server. It has 3 host. First 2 host only have SD cards where esxi is installed and its datastores are using the storage of the blade each with 8TB. The third host has SD card with the esxi installed and 2 internal 200GB SSD. First drive is where the vcenter installed and the 2nd drive is where the vsan witness.
I'm trying to unmount/delete the datastores on both Host 1 and Host 2 in order for me to add those datastores on the vsan storage but for some reason it keeps saying that datastore is being used. Here are the things I've done so far
1. disabled swap and host cache
2. disabled HA
3. set both datastores on maintenance mode
4. ensured no vm's inside
5. disabled Storage I/O control
6. removed from cluster
Not sure what else do I need to do?
Check if the devices are being used for anything else such as scratch partition, logging or coredumps, easiest way of checking the first two of these is Host > Configure > Advanced System Settings > Search (top right box) for global and scratch. Another possibility is VMs referencing ISOs etc mounted in CD/DVD tray on this datastore.
If you go to Host > Configure > Storage Devices > Select device - this should show the partitions on the device and > All Actions > Erase partitions - this should tell you what partitions are there that may be causing issues (e.g. ESXi installation partitions cannot be wiped).
As an aside, I am a vSAN expert (GSS-vSAN-EMEA/vExpert/#1Contributor in vSAN sub-community) if you need any help from that perspective later.
I searched for "global" nothing shows up. I tried to search for "scratch" and it showed me 3 entries
So what do I do with these 3 entries?
I tried "erasing partitions" and it showed me "Operation failed, cannot change the host configuration"
You are going to have to be more specific - it is expected that you have scratch location configured - the point is do you have these pointed to the partitions on the device you are trying to format.
If you do have scratch (or anything else) writing to this location (the box on the right-hand side will state where) then you will need to direct these elsewhere to be able to format the device (e.g. a permanent VMFS location or as an interim  /tmp/scratch).
Yes, I tried to check the partition's properties and yes this is what I saw on the Host > Configure > Advanced System Settings > ScratchConfig
The problem is, I can't redirect the ScratchConfig to a different volume since these 2 HOSTS doesn't have internal hard drives just like the 3rd HOST. It only has 2x SD cards and that's it, the storage goes to the FX storage.
Any workaround for this?
If scratch (or anything else) is indeed pointing to the device you are trying to remove then you can just point it to non-persistent locations such as  /tmp/scratch as I suggested above.
I tried both
but it didn't work. If I select erase partition since there's no files needed on this storage, Will it break the RAID and have to redo?
and made sure that these 2 folders are present. So I tried editing both
/tmp/scratch/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --> datastore
I also tried
but still didn't work
Please confirm that scratch pointing to the device you are trying to remove is actually the case. Potentially also syslog could be configured there if not scratch.
Both the examples you noted won't work it needs to be just:
And fairly sure reboot after set is required.
issue has been resolved. I had to remove the existing RAID volume, recreate it and reboot the hosts. After host reboot, then it shows the newly created RAID volume on vsan setup