Hi guys,
Would like a hand in being able to change the location of our syslogs and to also increase the size of log files.
Having an issue now, where within the first 6 months of this new setup we have run out of disk space "Ramdisk Var is full".
Current settings are the default. size of logs are at 1024 and default location of scratch directory.
I am running vSphere 6.7 with only 2 hosts. Each host has plenty of local disc space. Would like to set up new location on local disc with 5MB size and 10 rotations.
I am just unsure of how to create new directory to point to.
Thanks
Just open a SSH or login into to the local shell and type
df -h
cd /vmfs/volumes
ls -alh
cd yourlargedatastore
mkdir youresx1
The yourlargedatastore can be a shared or local one.
Now use esxcli to specify the syslog parameter you want and to get rid of the full ramdisk you need to restart the host. You can than check the content of the youresx1 directory.
Btw. before restarting you can set the scratch disk as well. See VMware Knowledge Base
Regards,
Joerg
Hello Joerg,
Thank you for your reply.
I have been able to create the directory which is currently to the local disc of host.
Whenever I try to change syslog directory from the GUI I get an error: A Specified parameter was not correct.
I am using the datastore and the new directory I added like so: [localdatastore] /youresx1/
This is what is driving me nuts.
I feel like I need to do a reboot of host and then maybe I might be able to make the change. and then reboot again to create a persistant scratch location.
With the current system not allowing me to migrate any vm's I have to do this after hours.
Hi Sukanyad,
Thank you for your reply.
I have a similar named datastore to you and have created a folder.
Datastore name is bresx03-local and folder name is syslog-esx03.
So when I add that in this format [bresx03-local] /syslog-esx03 I get an error message "A specified parameter was not correct:"
The syntax is incorrect
try the below:
[bresx03-local] syslog-esx03
I have tried that.
Just tried it again, I get the same error.
I just wonder that the current state of hosts with "ramdisk var full" error.
I need to reboot hosts to clear that out first I think.
yes you need to clear space otherwise it wont work .
Also reboot the host and try again.
I do have one other question.
If I make changes for a persistent scratch location, which I can see is done in the Scratch.ConfiguredScratchLocation field, Im assuming I dont need to change the path in the Syslog.global.LogDir?
Yes if the scratchconfig is already configured to a shared datastore we dont need syslog .
Awesome,
Well, I'm rebooting Hosts in about 2 hours.
Hope it all reboots OK with no issues. :smileyconfused:
Yes let me know the status
OH, one more thing.
How do I check if logging is happening to new scratch location?
Just open a SSH or login into to the local shell and type
ls -l
you can see scratch config location
or
cd /var/log/
it should take to datastore where logs are present
Hi Sukanyad,
Have rebooted hosts and no issues at all.
New scratch location has been changed as I wanted to.
All good.
Thanks for your help. Much appreciated.
Welcome
nice thanks