log2ram
PiShrink
log2ram | PiShrink | |
---|---|---|
51 | 16 | |
2,726 | 3,631 | |
1.4% | 1.6% | |
5.3 | 6.8 | |
6 months ago | 3 months ago | |
Shell | Shell | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
log2ram
-
Follow-up on the earlier "Why Proxmox VE shreds your SSDs" – with details
But stuff like /var/lib/pve-firewall and /var/lib/rrdcached was still written to every second.
I played around with mount options like commit=n
It kind of helped to use log2ram:
https://github.com/azlux/log2ram
but it sure didn't eliminate the problem.
I think with a little effort from the proxmox guys, They could gather a lot of low-hanging fruit.
-
Raspberry Pi 5
Reducing logging, logging to ram and writing to the sdcard once a day helps longevity a lot, especially with quality sd cards.
99% of the time it's the verbose logging of application servers that is the culprit of sdcard failures.
https://github.com/azlux/log2ram
- Pihole Regular Maintenance and Performance
- Using old MicroSD on RPi for PiHole, any issues?
-
Interesting M.2 devices for the HomeLabs
I always use this: https://github.com/azlux/log2ram
-
My remote Pi for my ADSB is going bad
If you've got other issues then it's quite likely that lots of small writes from logging and similar has worn out the SD card, mounting the SD card as read only or installing log2ram could prevent it happening to another SD card.
-
EsPiFF: An ESP32 in the Raspberry Pi form factor
> writing permanent its log files and swap partition
If this is the problem, the solutions are no swap and log2ram https://github.com/azlux/log2ram
I also noticed that Armbian logs to a ramdisk. I didn't investigate the implementation and if its contents survive a reboot.
The only real problems for me are that the SD card will eventually fail no matter what (I mean, much sooner than a SDD or HDD) and that there are basically no Pis at sale at a reasonable price. As a platform it is nearly dead.
-
Can My I5 2300(12GB RAM) Server Handle This Workload
For Pi-hole, I have an Rpi Zero with $10 Usb-to-Ethernet adapter, SD-card barely written (with Log2Ram) to avoid wear. Running about 3 years now almost unattended (besides security updates).
-
I finally found an use case for my Raspberry Pi Model B+
In addition to the other helpful suggestions you’ve received, look into using Log2Ram. It does what it sounds like, puts log writes in ram and then writes them to disk on a slower cadence that doesn’t work your SD card that much.
https://github.com/azlux/log2ram
-
Reduce disk writes for Ubuntu, save your USB stick
Log files are a bit trickier. I want these to stick around between reboots, so just storing them on a ramdisk wouldn't really work. Thankfully, log2ram solves this problem. Written primarily for Raspberry Pi machines, it works fine on x86-64 laptops. This stores /var/log in RAM but will sync the contents to disk from time to time, ideal for our needs.
PiShrink
- Opening Batocera Image Files
-
RPi4 sdcard died, wondering about the best way to backup my new card
There is a small utility, which shrinks the image by omitting the empty space. Then you can write it to any SD card, which the data will fit on. So in your case even on a 2GB card.
- SD Card Delima
-
How do you backup your RPi?
backup.sh - this is what makes the image and uses pishrink to shrink it
-
backup for noobs in linux
Depending on what single board computer you are using, you may want to look at PiShrink. This will at least allow you retroactively shrink the image you create to the actual amount of space used.
-
Backup a running Raspberry Pi over to the network to TrueNAS (Or anywhere else)
I was pretty familiar with most of this but I did not know about the "image backup" utility. You may also want to look at PiShrink in your process as well.
- How to remove unallocated space from disk image file?
- Can you take the image from a 256 SD card and use it to make a 2TB SDD/HDD into a bootable drive?
- Copying retro pie image
-
PiHole SD Card image copy
I run a full dd to create an image and then run pishrink https://github.com/Drewsif/PiShrink on it. I used to manually size the partition down with gparted and calculate how much to dd and then gparted the new card to expand the partition - too much work. Pishrink does all the work for you and is fast.
What are some alternatives?
folder2ram - mount those folders to ram without losing access to their counterpart on disk!
v2ray - 最好用的 V2Ray 一键安装脚本 & 管理脚本
docker-pi-hole - Pi-hole in a docker container
Debian-Pi-Aarch64 - This is the first 64-bit system in the world to support all Raspberry Pi 64-bit hardware!!! (Include: PI400,4B,3B+,3B,3A+,Zero2W)
rpi-clone - A shell script to clone a booted disk.
crankshaft - Crankshaft: A turnkey GNU/Linux solution that transforms a Raspberry Pi to an Android Auto head unit.