lsof +L1 | grep '(deleted)'VMware Identity Manager 3.3.7
The rsyslog service retains file handles for very large log files that have already been deleted. Because these files are still held open by the active 'rsyslog' process, the operating system cannot free the associated disk space on the root partition.
To immediately removed the lock, restart the 'rsyslog' service;
systemctl restart rsyslogTo prevent the issue from reoccurring, follow the steps below;
Verify that no active syslogs are currently configured by checking the status:
/usr/local/horizon/scripts/enableRSyslog.hzn statusOnce you confirm no syslogs are present, create a backup of the current 'rsyslog' configuration:
cp /etc/rsyslog.conf /etc/rsyslog.conf.bak
Open the configuration file in a text editor:
vi /etc/rsyslog.conf
Comment out all input methods from the file, then save and exit.
Restart the rsyslog service to apply the configuration changes:
systemctl restart rsyslog
Verify the service is running correctly:
systemctl status rsyslog
1. The steps listed above have were found in a larger KB related to mitigating issues with storage on the root partition;
2. After edit rsyslog.conf, If rsyslog status systemctl status rsyslog showing error during parsing file /etc/rsyslog.conf,
you can validate the error with command rsyslogd -N1.
: error during parsing file /etc/rsyslog.conf, on or before line 189: warnings occurred in file '/etc/rsyslog.conf' around line 189 ........: invalid character in selector line - ';template' expected ..........:error during parsing file /etc/rsyslog.conf, on or before line 189: errors occurred in file '/etc/rsyslog.conf' aroundline 189 ........
Verify 189 line with sed -n '185,195p' /etc/rsyslog.conf
local0,local1.* /var/log/localmessageslocal2,local3.* /var/log/localmessageslocal4,local5.* /var/log/localmessageslocal6,local7.* /var/log/localmessageslocal8.* /var/log/boot.log#### Pgpool Configuration startlocal1.* /var/log/pgService/pgService.log#### Pgpool Configuration end
* Note: There is no such thing as local8 in the syslog standard. Because rsyslog doesn't recognize local8 as a valid keyword, it completely fails to parse the line, assumes the configuration is corrupt, and throws that invalid character in selector line. The system only supports eight of them, numbered from local0 up to local7.
To fix the error Add a # at the very beginning of the local8 line. and save and restart the rsyslog file.
systemctl status rsyslog
Verify the output only shows those two harmless warning but no errors, and syntax is finally clean!