Life is a journey, not a race!

enjoy the journey

"The ramdisk "vsantraces" is full" error reports in vSAN logging

 

 

 

Hello folks,

I'm here with another hot topic of VMware vSAN troubleshooting.

Normally, if you installed your ESXi to a USB or SD device, the ramdisk for vSAN trace information may grow and fill the allotted ramdisk. We can redirect this logging to another location.

 

Hints: 

 

***300 MB ramdisk is the default maximum size when installing to USB/SD.

*** vSAN traces can grow to any size you select, but VMware recommends around 600 MB if available.

 

If we have persistent logging somewhere external to the vSAN, we can redirect using these steps.

If no other storage exists, skip to the end of this section to limit vsantraces to 200 MB.

 

 

Method 1: If external storage exists

 

01. Connect to each ESXi server in the cluster using SSH.

02. To set Configure VSAN trace, run this command:

[root@localhost:~] esxcli vsan trace
Usage: esxcli vsan trace set [cmd options]

 


Cmd options:

 

-f|--numfiles: Log file rotation for vSAN trace files.

-p|--path: Path to store vSAN trace files.

-r|--reset: When set to true, reset defaults for VSAN trace files.

-s|--size: Maximum size of vSAN trace files in MB.

 

note: 

If the Scratch folder has already been redirected, we can also redirect vsantraces into the same folder. There may be unique folders for each host that already exist on your storage for this if previously configured. In this case, create a folder called vsantraces so these can be separated out per-Host

 

After we have a folder for each Host and the logging is separated, we can redirect traces using these commands:

 

mkdir /vsantraces

esxcli vsan trace set -f 10 -s 60 -p /vsantraces

 

 

For example:

 

If files are located at /vmfs/volumes/Datastore/scratch/localhost/, run these commands:

 

mkdir /vmfs/volumes/Datastore/scratch/localhost/vsantraces/

esxcli vsan trace set -f 10 -s 60 -p /vmfs/volumes/Datastore/scratch/localhost/vsantraces/

 

just replace the storage path and items as you have.

 

***reboot your ESXi host

 

 

**********************************************************************************************************************************

 

Method 2: If No External Storage is Available

 

If no additional storage is available, limit the size of vsantraces to 200MB. This allows a bit of overhead for additional files and ensures that we do not fill the ramdisk.

 

You can do this by running this command on every vSAN host:

 


esxcli vsan trace set -f 10 -s 20

 


These changes are immediate and older files will be rolled off as smaller ones take their places over time.

 

 

***reboot your ESXi host

 

 

 

enjoy it!

vExpert Badge