Logrotate does not work for cron jobs if "olddir" is in another device.

(Doc ID 2328765.1)

Last updated on JANUARY 29, 2018

Applies to:

Linux OS - Version Oracle Linux 6.1 and later
Linux x86-64

Symptoms

 The server logs are rotated in the directory that normally is set on the "olddir" option of the configuration files. But  logrotate is failing with errors  like on /var/log/messages or on the "logrotate" command output :

"error: psacct:15 olddir /var/log/archive and log file /var/account/pacct are on different devices
error: found error in file psacct, skipping"

 

Changes

This situation can happen when the system contain /var and /var/log on different mount points (devices).

Example:

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms