Re: rsyslog does not log on a separate partition/FS mounted on /var/log/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



In article <CAHhM8gD+hFdUyy7uAH3KX2h37cA5fDbBWtJWYckV9Tp3_4nzQw@xxxxxxxxxxxxxx>,
Arun Khan <knura9@xxxxxxxxx> wrote:
> The system is an AWS Instance based on a community CentOS 6.4 AMI snapshot.
> 
> The vdisk is as follows as shown below [1]
> The root LVM contains /var/log/
> 
> I have attached another block device with ext4 FS.
> 
> I copied the files from /var/log to this device (mounted on /mnt) and
> then changed
> /etc/fstab to mount this device on /var/log on boot.
> 
> However, I do not see anything being logged in /var/log/messages.
> To test the logging, I used the 'logger' command to log some string; nothing
> appears in /var/log/messages.
> 
> 'service rsyslog status' reports the daemon is running.
> 
> When I stop rsyslog, umount the /var/log device and then restart rsyslog, I can
> see that logs are being recorded in /var/log/messages.  Using the 'logger'
> command I can see messages written in /var/log/messages.
> 
> man pages of ryslog.conf and rsyslogd show nothing related to logs
> being on a separate device
> 
> Any pointers to fix the problem would be much appreciated.

Probably rsyslog is being started before /var/log is mounted, and so it
is opening files within /var/log on the root device.

When the second device gets mounted on /var/log, the files within the
original /var/log are no longer visible, but rsyslog still has open handles
to them.

You need to arrange for rsyslog to get restarted or HUPed after the mounting
of /var/log.

Cheers
Tony
-- 
Tony Mountifield
Work: tony@xxxxxxxxxxxxx - http://www.softins.co.uk
Play: tony@xxxxxxxxxxxxxxx - http://tony.mountifield.org
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux