Unable to upload, copy, or create files in a VMware vSAN-backed datastore
search cancel

Unable to upload, copy, or create files in a VMware vSAN-backed datastore

book

Article ID: 326952

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

Symptoms:
  • Attempting to upload files to the root directory of a vSAN (formerly known as Virtual SAN) datastore using the vSphere Client or vSphere Web Client fails with error messages.
  • Attempting to upload files to the root directory of a vSAN datastore using ssh tools such as WinSCP, FileZilla or puTTY fail.
  • Attempting to create or copy files to the root directory of a vSAN datastore using the touch, cp, mkdir, or mv commands from the ESXi console fails.


Environment

VMware vSAN 6.0.x
VMware vSAN 6.5.x
VMware vSAN 6.2.x
VMware vSAN 5.5.x

Cause

This issue occurs because vSAN does not support the storage of user files in the root of the directory structure. With vSAN, file operations can only take place within namespace objects. Therefore, folders are the only objects permitted within the OSFS (object store file system, the root of a vSAN datastore). This is expected behavior.
 
To upload files to vSAN, you must first create a subdirectory for the files.

Resolution

To create a folder in the OSFS, use the osfs-mkdir utility from the ESXi console:
 
cd /vmfs/volumes/<vsan datastore>/
/usr/lib/vmware/osfs/bin/osfs-mkdir /vmfs/volumes/<vsan datastore>/folderName
 
The appropriate OSFS calls are made automatically if you use the datastore browser from within the vSphere Web Client to create the directory.

You may log in to vSphere html5 web client to log in to vCenter Server and try creating the folder inside the vSAN datastore. 

The directory created on vSAN datastore has a size of 255 GB by default. Any files/data which are created/copied inside the directory without an associated DOM Object will be placed as a file that has a limitation of 255 GB.  Beyond that the copy operation will fail.

The proper method for migrating VMs to vSAN from any other type of datastore is storage vMotion. This way if any VM that may be larger than 255GB can be created properly on vSAN during the migration.


Additional Information