Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] journald refuses to put log files in /var/log/journal/
Date: Tue, 23 Sep 2014 03:51:16
Message-Id: CADPrc82-JKwy5ieSrdxa8+q=fQf9rvtauEOj2VoqMMTVEwkhhw@mail.gmail.com
In Reply to: [gentoo-user] journald refuses to put log files in /var/log/journal/ by walt
1 On Mon, Sep 22, 2014 at 7:41 PM, walt <w41ter@×××××.com> wrote:
2 > My main desktop machine is obviously having a brain fart :(
3 >
4 > systemd-journald is allegedly obligated to write its journal files
5 > to /var/log/journal/ *if* that directory exists, right?
6 >
7 > Well, on my three other gentoo ~amd64 machines, that's exactly what
8 > journald does.
9 >
10 > But not on my everyday work machine, oh no. I'd be daft to expect
11 > my one main everyday machine to obey the rules, right?
12 >
13 > On this machine (the one I'm using now) journald is writing its
14 > files to /run/log/journal/ instead of /var/log/journal/
15 >
16 > # ls -l /var/log/journal/
17 > total 4
18 > drwxr-sr-x 2 root systemd-journal-remote 4096 Sep 22 14:39 remote
19 >
20 > #ls -l /var/log/journal/remote/
21 > total 0
22 >
23 >
24 > The *.conf files in /etc/systemd/ are the same on all machines:
25 > all of the config items are commented out, as sys-apps/systemd
26 > installed them.
27 >
28 > So, why is this particular machine not behaving like the others?
29
30 Hi Walt; the relevant documentation is from man 8 systemd-journald:
31
32 "By default, the journal stores log data in /run/log/journal/. Since
33 /run/ is volatile, log data is lost at reboot. To make the data
34 persistent, it is sufficient to create /var/log/journal/ where
35 systemd-journald will then store the data."
36
37 So, in the failing machine the journal is not flushing its volatile
38 data to /var. I would suspect a permissions issue. Could you please
39 post the output from:
40
41 # ls -ld /var/log/journal
42
43 In my main machine, this is:
44
45 drwxr-sr-x 3 root systemd-journal 4096 Oct 28 2012 /var/log/journal
46
47 So its 2755; all permissions for root, read and execution (with SETGID
48 bit on), and read and execution for everyone else. The directory is
49 owned by root, and it's on the systemd-journal group.
50
51 Regards.
52 --
53 Canek Peláez Valdés
54 Profesor de asignatura, Facultad de Ciencias
55 Universidad Nacional Autónoma de México

Replies