Background:
If log data in /var/log/ consumes all available space on the XenServer’s root partition, XAPI will never accept for new connections, and HA heartbeat will lose as well.
If log data in /var/log/ consumes all available space on the XenServer’s root partition, XAPI will never accept for new connections, and HA heartbeat will lose as well.
In order to prevent root partition full related issues on Legacy partition layout environment, Log Rotation is working as below in XenServer 7.x:
- Logic of log rotation script /opt/xensource/bin/logrotate-xenserver has been changed compare with previous version:
Logfiles are conditionally rotated every minute by the cronjob in /etc/cron.d/logrotate.cron depending on the current disk space consumption of /var/log.
This uses a config generated from /etc/logrotate-xenserver.conf and run gzip to compress rotated log file.
- The following scripts have been disabled by first boot script /etc/firstboot.d/95-legacy-logrotate:
/etc/cron.daily/logrotate
/etc/cron.d/xapi-logrotate.cron
Hence, there’s ONLY 1 generation of .gz file under /var/log, if you need to increase volume of .gz log files, please run below command to enable daily log rotation script:
mv /etc/cron.daily/logrotate~ /etc/cron.daily/logrotate