VMware ESX服务器日志空间满引起的报错

间隙填充
正睿科技  发布时间:2010-11-02 17:33:37  浏览数:7157

A general system error occurred: Failed to create journal file providerFailed to open "/var/log/vmware/journal/1269xxxxxx.x" for write
Symptoms
You see this error message when you try to clone or migrate (VMotion) a virtual machine the /var/log directory on the host is configured on a separate partition:


A general system error occurred: Failed to create journal file providerFailed to open "/var/log/vmware/journal/1269032951.9" for write
Resolution
This issue occurs due to lack of free space in the partition containing the /var/log folder. To resolve this issue, free disk space on this partition.
 
To free disk space:
Run this comm to check the disk usage of the partition containing the /var/log folder:


vdf -h


Output:


Filesystem            Size  Used  Avail  Use% Mounted on
/dev/sdb5             4.9G   2.7G  2.0G    58%  /
/dev/sda1             1.1G   75M  952M     8%  /boot
/dev/sdb2             2.0G   2.0G       0  100%  /var/log
/vmfs/devices         1.1T       0   1.1T     0%  /vmfs/devices
/vmfs/volumes/4a927337-382f7868-83c8-00215e6fe3aa
                           272G  243G   28G  89% /vmfs/volumes/local-129


This example Indicates the partition containing the /var/log directory is full.


Search for large files in the partition containing the /var/log folder. For more information, see: Investigate disk space on an ESX host (1003564). For example:


find /var/log/ -size +10240000c -exec du -h {} \; | less

 

Delete any unwanted files to ensure adequate free space.


Restart the host logging services:


service syslog restart

Additional Information
Provided below are some example files which can be removed in the event of space exhaustion. However rather than outright removal of log files, compression archival of the files is recommended, in case they are required later for reference in troubleshooting or trending.

Compress your /var/log/vmkwarning files (ESX):


tar czvf /tmp/vmkwarning-logs.tgz /var/log/vmkwarning*

 

Compress your past /var/log/vmkernel files (ESX):


tar czvf /tmp/vmkernel-logs.tgz /var/log/vmkernel.*

 

Compress your past /var/log/messages files (ESX & ESXi):


tar czvf /tmp/messages-logs.tgz /var/log/messages.*

 

Remove the files:


rm -f /var/log/vmkwarning.* /var/log/vmkernel.* /var/log/messages.*


Warning: Take special care using the rm -f comm. It will not prompt for user confirmation when deleting each file.


Relocate the created archive files back to your /var/log partition for long-term storage:


mv /tmp/*-logs.tgz /var/log