Increase the size of the logging directory
search cancel

Increase the size of the logging directory

book

Article ID: 321748

calendar_today

Updated On: 03-25-2025

Products

VMware Integrated OpenStack

Issue/Introduction

  • Log collection fails due to the drive filling up /var/log/ there may be a need for either cleanup or increasing the disk size.

 

Environment

7.x

Resolution

Note:  Before doing any work make sure we have a current backup of VIO.  For more information, see Backup and Restore.

Cleaning up files on logical volume containing /var/log on the VIO manager

  1. Check the size and Use% of current system.

# df -h /var/log
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/logs_vg-log   30G  30G   30G  100% /var/log

  1. Check space taken up by journal logs.
# journalctl --disk-usage
Archived and active journals take up 1.4G in the file system.
  1. Vacuum the journal logs to reduce space taken up.  Chose an appropriate value for you environment.
# journalctl --vacuum-size=200M
Deleted archived journal /var/log/journal/####/system@####-####-####.journal (104.0M).
...
 /var/log/journal/####/system@####-####-####.journal (104.0M).
Vacuuming done, freed 1.2G of archived journals from /var/log/journal/e21ec5ea576c4a52acd1740a6dd9c845.

 

Increasing the size of the logical volume containing /var/log on the VIO manager

Note: Access to both vCenter and the command line of the VIO manager are needed:

  1. Add a new disk to VIO manager in vCenter.
  2. Create the volume in the command line on the VIO manager.  If no other new disk has been added in the past we can assume it is available as /dev/sdc.
pvcreate /dev/sdc
  1. Add /dev/sdc to the volume group:
vgextend logs_vg /dev/sdc
  1. Extend the logical volume:
lvm lvextend -l +100%FREE /dev/mapper/logs_vg-log
  1. Resize the mapping as the last step:
resize2fs -p /dev/mapper/logs_vg-log

 

 

Additional Information