Comments (8)
Actually, I just came across this project and was wondering what this is all about. I mean, I know that people are trying to avoid disk-writes on their SSDs and SD-Cards, but AFAIK that is completely possible with /etc/systemd/journald.conf (e.g. Storage=volatile).
It's about the opposite. The purpose of the project as a whole is to stop all applications, not just journald, from logging to SD card. The purpose of this discussion is to request an exception so that journald DOES log to SD card, since it understands how to minimise writes to the card anyway, and since it can be important to have a persistent log of the last messages in a system crash.
from log2ram.
My goal is to avoid SDcart write, and I don't know how journald manage that
It already has a sensible mechanism to minimise writes, whilst also guaranteeing that as much as possible makes it to disk in the event of a system crash. That's why I believe /var/log/journal should be bound to persistent storage. Full details are at https://www.freedesktop.org/software/systemd/man/journald.conf.html but basically it writes to disk at a configurable period - SyncIntervalSec - that defaults to 5 minutes but can of course be adjusted by the user.
from log2ram.
@azlux Actually, I just came across this project and was wondering what this is all about. I mean, I know that people are trying to avoid disk-writes on their SSDs and SD-Cards, but AFAIK that is completely possible with /etc/systemd/journald.conf
(e.g. Storage=volatile
).
from log2ram.
Hi @djh42 .
I will try to answers all your questions:
- Log2ram already use a bind mount.
- I didn't know about the systemd-journal-flush.service, I will check that. Is there are any conflict to use it the way I've done it ?
- Apache2 was an old example when you have others services. Since few mounth, Log2Ram start before the journal, It's now useless. Almost every service start after the journal service.
Az
from log2ram.
Log2ram already use a bind mount.
For /var/log/journal? To place it on persistent storage.
Is there are any conflict to use it the way I've done it ?
Not as far as I know, but I'm no expert.
Apache2 was an old example when you have others services. Since few mounth, Log2Ram start before the journal, It's now useless. Almost every service start after the journal service.
I'm not sure what you mean here. You mean the before=apache2 is useless? If so, I think that's good news. :)
from log2ram.
Your right, /var/log/journal
isn't on Disk. But I don't like place it on persistent storage.
My goal is to avoid SDcart write, and I don't know how journald manage that.
from log2ram.
May I add here a question?
Do ram2log write enterely the ram log folder into the log.hdd folder on sd every hour? I mean, does it overwrite all files including the pnes that aren't untuched, or only the ones that have more recent modified time (from the last backup, the last hour, as default). Shortly, does ram2log reduces the writes on SD avoiding to rewrite files that haven't been modified?
Thank you
from log2ram.
Hi,
If you check this line https://github.com/azlux/log2ram/blob/master/log2ram#L21
You will see I only sync the modified file.
The main issue with SDcart is to have constant write, file are always open into the system.
You can move the cron from hourly to daily if you want (Or remove it, for no cron write, data will be write on Raspberry stop/start)
from log2ram.
Related Issues (20)
- Ending up with non-ARM binaries HOT 2
- Not starting
- Strange issue where hdd.log is on RAM and not syncing to SD HOT 5
- Feature request: rsync with remote server HOT 1
- Status appears to start & stop log2ram. Option to just show status?
- rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1333) [sender=3.2.3] HOT 10
- log of log2ram in the specific directory
- Alignment with armbian ramlog HOT 2
- There is no log2ram job in cron.* HOT 2
- Has this been submitted to the Debian/Raspbian repositories? If not it should! HOT 4
- Debian 12 Bookworm support HOT 1
- RAM disk too small HOT 1
- Using log2ram for other ramdisk purposes? HOT 1
- Log2Ram won't start on RPi OS 64-bit HOT 2
- Buster repo missing HOT 5
- Changeing timer does not work HOT 2
- 500 Internal Server Error when attempting to download repo.gpg.key HOT 1
- Latest APT version (1.6.1) far behind Git repo HOT 9
- log2ram failed to update writes to disk at reboot HOT 3
- E: Unable to locate package log2ram HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log2ram.