Uploading files directly to vSAN is not the best option. There are many ways to move data to vSAN clusters. For .iso files you can use native vSAN NFS service. For moving VMs we have Storage vMotion, HCX can be used or Cross vCenter Workload Migration Utility fling (that is also included in vSphere 7.0 Update 1c release). The
move-VM PowerCLI command is also possible between vCenters that don’t share SSO. vSphere Replication could also be an option or restore from a backup. Those methods are well documented and use supported APIs.
But if there is a corner case and a file needs to be put on vsanDatastore, this is also possible but not for all file sizes. System will not allow us to upload to the root path directly, we will have to create a folder on the datastore.
The first issue you will probably see after trying to upload a first file is the following:
Opening the recommended url and login into ESXi directly should be sufficient authorise us to upload files on vsanDatastore directly.
I tested it with some smaller files and up to 255 GB on vSAN 7.0 U1 cluster and the upload was successful:
but adding another file in this folder failed:
Also uploading a >255GB file in a new folder on the vsanDatastore failed. What I could find in ESXi vmkernel.log was the following:
write to large_file.ova (...) 1048576 bytes failed: No space left on device
'cb954c60-5416-7dfa-6d87-1c34da607660': [rt 1] No Space - did not find enough resources after second pass! (needed: 1, found: 0)
It looks like uploading files do vsanDatastore directly bypasses the logic that stripes objects larger than 255GB into smaller components. Why is that?
Looking into the file path, you can determine its object UUID which in my case was:
You can use the following command to query this object in esxi directly:
esxcli vsan debug object list -u cb954c60-5416-7dfa-6d87-1c34da607660
Now we have the answer. Object type our our direct upload is
vmnamespace and it’s like a container with fixed size of 255.00 GB. And this is the max number of GB that we can place there. By default it uses vSAN Default Storage Policy (FTT=1, mirror in this cluster).