Issue with /var/log mounting
This document (000020348) is provided subject to the disclaimer at the end of this document.
Environment
Situation
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
# 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
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com