Starting with vSAN 8.0 Update 1, the Native vSAN Trace Object feature was introduced to retain historical vSAN trace logs for extended periods to support troubleshooting.
With this feature, trace logs written to the RAM disk are persisted to the Native vSAN Trace Object (.vsan.trace) on the vSAN datastore.
Historical trace logs stored in the Native vSAN Trace Object can be collected by specifying the VSANTracesExtended option when generating a support bundle.
see Collecting vSAN support logs and uploading to Broadcom VCF Support.
Even in environments using this feature, when the utilization of the /vsantraces RAM disk is high, trace output may be redirected to a persistent scratch location as a workaround.
When this configuration change is made, new trace logs are no longer stored in the Native vSAN Trace Object (.vsan.trace directory) on the vSAN datastore.
In this case, the log retention period depends on the rotation settings and trace generation rate at the new location and may be shorter than when using the Native vSAN Trace Object.
VMware vSAN 8.0 Update 1 and later
This is expected behavior.
The Native vSAN Trace Object persistence mechanism operates with the default vSAN trace output path (/vsantraces).
Trace logs written to the RAM disk are periodically persisted to the Native vSAN Trace Object (.vsan.trace) on the vSAN datastore, where log retention and rotation are managed.
However, when trace output is redirected to a persistent scratch location, persistence to the Native vSAN Trace Object is disabled, and trace logs at the new location are rotated according to the configured file size and rotation count.
For more information, see vSAN Traces Observed on ESXi RAM Disk in vSAN 8.0 Update 1 and Later.
When the Native vSAN Trace Object is functioning correctly, high RAM disk utilization alone does not require redirecting trace output to a persistent scratch location.
If the RAM disk becomes full, investigate the cause and consider adjusting the trace rotation settings for the RAM disk as necessary.
For more information, see Error: The ramdisk 'vsantraces' or 'vsantraceFailover' is full on vSAN ESXi host.
An issue that caused imbalanced trace retention periods across hosts in the Native vSAN Trace Object has been resolved in ESXi 8.0 Update 3h and later. If this issue occurs on a version earlier than ESXi 8.0 Update 3h, upgrade to a version that includes the fix.
If operational requirements call for storing trace logs in a persistent location other than the vSAN datastore, trace output can still be redirected.
In that case, adjust the log rotation settings (file size × number of rotated files) based on the actual trace generation rate to achieve the required log retention period.
For details on configuring log rotation settings, see Redirecting urgent vSAN trace-level messages to a syslog server.