1 |
On 09/22/2014 08:50 PM, Canek Peláez Valdés wrote: |
2 |
> On Mon, Sep 22, 2014 at 7:41 PM, walt <w41ter@×××××.com> wrote: |
3 |
>> My main desktop machine is obviously having a brain fart :( |
4 |
>> |
5 |
>> systemd-journald is allegedly obligated to write its journal files |
6 |
>> to /var/log/journal/ *if* that directory exists, right? |
7 |
>> |
8 |
>> Well, on my three other gentoo ~amd64 machines, that's exactly what |
9 |
>> journald does. |
10 |
>> |
11 |
>> But not on my everyday work machine, oh no. I'd be daft to expect |
12 |
>> my one main everyday machine to obey the rules, right? |
13 |
>> |
14 |
>> On this machine (the one I'm using now) journald is writing its |
15 |
>> files to /run/log/journal/ instead of /var/log/journal/ |
16 |
>> |
17 |
>> # ls -l /var/log/journal/ |
18 |
>> total 4 |
19 |
>> drwxr-sr-x 2 root systemd-journal-remote 4096 Sep 22 14:39 remote |
20 |
>> |
21 |
>> #ls -l /var/log/journal/remote/ |
22 |
>> total 0 |
23 |
>> |
24 |
>> |
25 |
>> The *.conf files in /etc/systemd/ are the same on all machines: |
26 |
>> all of the config items are commented out, as sys-apps/systemd |
27 |
>> installed them. |
28 |
>> |
29 |
>> So, why is this particular machine not behaving like the others? |
30 |
> |
31 |
> Hi Walt; the relevant documentation is from man 8 systemd-journald: |
32 |
> |
33 |
> "By default, the journal stores log data in /run/log/journal/. Since |
34 |
> /run/ is volatile, log data is lost at reboot. To make the data |
35 |
> persistent, it is sufficient to create /var/log/journal/ where |
36 |
> systemd-journald will then store the data." |
37 |
> |
38 |
> So, in the failing machine the journal is not flushing its volatile |
39 |
> data to /var. I would suspect a permissions issue. Could you please |
40 |
> post the output from: |
41 |
> |
42 |
> # ls -ld /var/log/journal |
43 |
> |
44 |
> In my main machine, this is: |
45 |
> |
46 |
> drwxr-sr-x 3 root systemd-journal 4096 Oct 28 2012 /var/log/journal |
47 |
> |
48 |
> So its 2755; all permissions for root, read and execution (with SETGID |
49 |
> bit on), and read and execution for everyone else. The directory is |
50 |
> owned by root, and it's on the systemd-journal group. |
51 |
|
52 |
Thanks, Rich and Canek. I fixed the problem by accident while trying |
53 |
to debug it. |
54 |
|
55 |
I used systemctl to stop and restart systemd-journald, thinking I might |
56 |
see some useful error messages. But when systemd-journal started up |
57 |
again the journal file was back in /var/log/journal where I want it :) |
58 |
|
59 |
No idea why rebooting the machine didn't do the same thing. |
60 |
|
61 |
Thanks. |