Disk space on XenServer's root partition is almost at (or is at) capacity per df -h
There are numerous compressed "gz" files in /var/log/ from Syslog rotation
Log rotation, or "logrotate", is what ensures that Syslog files in /var/log do not grow out of hand. Much like Syslog, logrotate utilizes a configuration file to dictate how often, at what size, and if compression should be used when archiving a particular Syslog file. The term "archive" is truly meant for rotating out a current log in place of a fresh, current log to take its place.
Post XenServer installation and before usage, one can measure the amount of free root disk space by executing the following command:
df -h
The output will be similar to the following and the line one should be most concerned with is in bold font:
Filesystem Size Used Avail Use% Mounted on /dev/sda1 4.0G 1.9G 2.0G 49% / none 381M 16K 381M 1% /dev/shm /opt/xensource/packages/iso/XenCenter.iso 52M 52M 0 100% /var/xen/xc-install
Once can see by the example that only 49% of the root disk on this XenServer host has been used. Repeating this process as implementation ramps up, an administrator should be able to measure how best to tune logrotate's configuration file for after install, /etc/logrotate should resemble the following:
# see "man logrotate" for details # rotate log files weekly weekly # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed #compress # RPM packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp -- we'll rotate them here /var/log/wtmp { monthly minsize 1M create 0664 root utmp rotate 1 } /var/log/btmp { missingok monthly minsize 1M create 0600 root utmp rotate 1 } # system-specific logs may be also be configured here.
In previous versions, /etc/logrotate.conf was setup to retain 999 archived/rotated logs, but as of 6.2 the configuration above is standard.
Before covering the basic premise and purpose of this configuration file, one can see this exact configuration file explained in more detail at http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/
The options declared in the default configuration are conditions that, when met, rotate logs accordingly:
In summary for logrotate, one is advised to measure use of the root disk using "df -h" and to tune logrotate.conf as needed to ensure Syslog does not inadvertently consume available disk space.