Comments (2)
As the processes of the services are completely independent one can just exchange the out file-node where to write to. An option may be to use "falloate --punch-hole" to put sparse blocks into the journal.
If one does really want to have a rotatation one could do some "dd" first. However I would prefer to not do such file creation - or even do it like just once a day.
Instead I would like to implement an option where the journal is given a maximum non-sparse value, and everything below is getting punched in the init_loop. That should keep the interruptions rather short - just one hole at a time most of the times.
fallocate --punch-hole --offset 40K --length 4K service.log
# TEST
dd if=/dev/random of=random1.log count=200
dd if=/dev/random of=random2.log count=200
fallocate -p -o 0 -l 12K random1.log
du random*
16 random2.log
4 random.log
cat random1.log | od -a | wc -l
223
cat random2.log | od -a | wc -l
985
ls -l random*
-rw-r--r-- 15805 10. Sep 16:02 random1.log
-rw-r--r-- 15735 10. Sep 16:03 random2.log
from docker-systemctl-replacement.
man fallocate(1)
-p, --punch-hole
Deallocates space (i.e., creates a hole) in the byte range starting at offset and continuing for length bytes. Within the specified
range, partial filesystem blocks are zeroed, and whole filesystem blocks are removed from the file. After a successful call, subsequent
reads from this range will return zeroes. This option may not be specified at the same time as the --zero-range option. Also, when
using this option, --keep-size is implied.
Supported for XFS (since Linux 2.6.38), ext4 (since Linux 3.0), Btrfs (since Linux 3.7) and tmpfs (since Linux 3.5).
from docker-systemctl-replacement.
Related Issues (20)
- python3 HOT 2
- Version tag 1.5.1706 HOT 1
- 'systemctl' not working HOT 16
- Starting a service during image build / docker file, hangs HOT 7
- Possible to work with ansible service_facts module? HOT 1
- systemctl3.py not working on Rocky Linux 8 HOT 1
- Misleading error message interaction between ExecStart= and ExecStartPost= HOT 3
- systemctl enable doesn't copy service file to right place. HOT 1
- When control-C on systemctl log -f xxx, it raise an ugly KeyboardInterrupt HOT 2
- systemctl disable not disabling service at container restart HOT 1
- can this script be used on ubuntu 22.04? HOT 1
- How is this suppoused to be ussed? HOT 1
- ERROR:systemctl: nextcloud.service: Failed to parse service type, ignoring: exec HOT 1
- Install to Centos6.8 HOT 1
- StartLimitIntervalSec=0 or how to Restart Forever HOT 1
- status command shows unit files ignored by SystemD HOT 2
- systemctl show does not respect multiple `-p/--property` switches HOT 1
- BlockingIOError: [Errno 11] Resource temporarily unavailable HOT 11
- Can't understand how logs and tty are working
- Support for systemd-inhibit? 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 docker-systemctl-replacement.