On Mon, 10 Feb 2020 23:52:53 -0500
Jeff Licquia wrote:
>This sounds like an issue for your system. In general, the FHS is a
>guide for software developers; when you set things up to write or read
>data of various types, here's where you should place them. If this is
>your system, you're free to do what you want.
Thanks for replying.
I'm asking the question in general, not just for me. I'd like to report
an answer back so software releases and other users can all use the
same location.
>One option would be to permanently mount a persistent filesystem in
>/var/log/journal, but given that this is a Raspberry Pi, you may not
>have that flexibility.
I'd rather avoid creating a whole new filesystem if I can. It feels
like an extra complication and would mean the default journald.conf
needs to be overridden. It's all doable I think but doesn't seem very
attractive.
>So, I'd create something like /local for local data of this nature,
>and bind mount under that, to something like /local/journal. But
>that's just a suggestion.
OK, I was considering /var/log.persistent but now I've realized that
the location is pretty much dictated by the structure of filesystems on
the pi. On this one there are three persistent filesystems:
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.9G 1.8G 1.9G 49% /
/dev/mmcblk0p1 43M 22M 21M 52% /boot
/dev/mmcblk0p3 11G 547M 9.3G 6% /home/pi/data
So really the storage for the journal needs to go somewhere
under /home/pi/data since that has the most space available. It's not
ideal conceptually, but practicality wins every time :)
Thanks again,
Dave
>If I've misunderstood, let me know, and I'll see if I can be more
>helpful.
>
>On 1/26/20 3:38 PM, Dave wrote:
>> It's quite common on the Raspberry Pi to make /var/log a tmpfs, in
>> order to reduce the number of writes to the SD card that is the pi's
>> main storage. That's quite acceptable for most logs but I'd like to
>> make journald's logs persistent so I'll be able to investigate any
>> crashes more easily.
>>
>> It's not possible to tell journald to log somewhere other than
>> /var/log/journal, so I need to bind mount another directory on a
>> persistent filesystem over /var/log/journal
>>
>> The question is, where should that other directory be placed in the
>> filesystem? /var/lib/journal sounds attractive except FHS 3.0 says
>> "... should not be logging output ...". So where should persistent
>> log files be kept, if /var/log is a tmpfs?
>>
>> TIA, Dave
>> ___
>> fhs-discuss mailing list
>> fhs-discuss@lists.linux-foundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/fhs-discuss
>>
___
fhs-discuss mailing list
fhs-discuss@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/fhs-discuss