Debian and other Linux distributions reserve 5% of a filesystem for the root account; this is so unprivileged users can't completely fill up a filesystem and break system operations such as event logging. Just my opinion but that 5% was a great idea when drives were smaller but 5% of a 1TB drive is 50GB and that can be a lot of useful space that may not ever be used.
By default systemd limits the size of its journal to 4GB so on our 1TB drive that'd be quite a bit of space on the drive that can only be accessed by the root account. Fortunately the reserved space on a filesystem can be adjusted using tune2fs. From tune2fs' man page -so on my 512GB root partition that would be about 25GB of space on the drive that is only accessible by root. As mentioned jounalctl is limited to 4GB so that's a fair bit of wasted space. Here's what I did -which set the reserved percentage at 1% (about 5GB). If you've got a really big root partition decimals are supported so -m 0.5 would also work if you prefer.
For non-root partitions there may not be need for reserved space at all - such as on my backup media so I can doIf you wanted to check how much disk space is reserved for root a quick and dirty way to do it would be with tune2fs -l and browse its output or if you wanted to just see reserved space you could doIf you multiply reserved block count by block size you get reserved space in bytes.
Hope this gives folks some ideas![Smile :)]()
By default systemd limits the size of its journal to 4GB so on our 1TB drive that'd be quite a bit of space on the drive that can only be accessed by the root account. Fortunately the reserved space on a filesystem can be adjusted using tune2fs. From tune2fs' man page -
Code:
-m reserved-blocks-percentage Set the percentage of the file system which may only be allocated by privileged processes. Reserving some number of file system blocks for use by privileged processes is done to avoid file sys‐ tem fragmentation, and to allow system daemons, such as sys‐ logd(8), to continue to function correctly after non-privileged processes are prevented from writing to the file system. Nor‐ mally, the default percentage of reserved blocks is 5%.
Code:
wizard@laptop 15:09:14 $ sudo tune2fs -m 1 /dev/nvme0n1p2[sudo] password for wizard: tune2fs 1.47.2 (1-Jan-2025)Setting reserved blocks percentage to 1% (1249047 blocks)wizard@laptop 15:09:30 $
For non-root partitions there may not be need for reserved space at all - such as on my backup media so I can do
Code:
wizard@server 15:12:10 $ sudo tune2fs -m 0 /dev/sda1[sudo] password for wizard: tune2fs 1.47.2 (1-Jan-2025)Setting reserved blocks percentage to 0% (0 blocks)wizard@server 15:12:38 $
Code:
wizard@laptop 15:09:30 $ sudo tune2fs -l /dev/nvme0n1p2 | grep "Reserved block count\|Block size"Reserved block count: 1249047Block size: 4096wizard@laptop 15:15:13 $
Hope this gives folks some ideas

Statistics: Posted by wizard10000 — 2025-01-17 21:22 — Replies 0 — Views 31