Issue with /var/log mounting

This document (000020348) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15 SP2

Situation

After upgrading to SUSE Linux Enterprise Server 15 SP2 auditd rules were missing then we noticed that auditd wasn't running because /var/log/audit was missing.  We found that they were getting mounted to the wrong directory as seen below.

1. /var/log mounts to /run/initramfs/log
2. /var/log/audit mounts to /run/initramfs/log/audit

Test
*Make a bind mount of the root file system and check where /var/log points:
# mkdir /mnt/root
# mount --bind / /mnt/root
# ls -ld /mnt/root/var
# ls -ld /mnt/root/var/log

Possible Results
s4ha6prd:~ # mount --bind / /mnt/root
s4ha6prd:~ #
s4ha6prd:~ # ls -ld /mnt/root/var
drwxr-xr-x 3 root root 28 Aug 31 11:58 /mnt/root/var
s4ha6prd:~ #
s4ha6prd:~ # ls -ld /mnt/root/var/log
lrwxrwxrwx 1 root root 18 Aug 31 11:58 /mnt/root/var/log -> /run/initramfs/log
s4ha6prd:~ #

In general, since /var is in their case a mount point for /dev/system/lvvar, it
is advised to make this directory empty on the root file system. All files in
it will be made inaccessible when /dev/system/lvvar gets mounted over it.

Resolution

Run these commands to fix the issue
 # mount --bind / /mnt/root
 # rm /mnt/root/var/log

Reboot

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020348
  • Creation Date: 26-Jul-2021
  • Modified Date:28-Jul-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center