this post was submitted on 30 Nov 2026
12 points (87.5% liked)

Linux

68974 readers
494 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 7 years ago
MODERATORS
 

Just wanted to make sure and ask if this is good enough.

set -e

echo "=== fstrim ==="
fstrim -av

echo "=== BTRFS scrub status before ==="
btrfs scrub status /

echo "=== BTRFS scrub start ==="
btrfs scrub start -B /

echo "=== BTRFS scrub status after ==="
btrfs scrub status /

echo "=== BTRFS balance (50%) ==="
btrfs balance start -dusage=50 /

echo "=== Done ==="```
you are viewing a single comment's thread
view the rest of the comments
[–] talkingpumpkin@lemmy.world 12 points 1 day ago (4 children)

how is my maintenance script?

Most probably, unnecessary :)

Doesn't your distro have systemd units that run that stuff on a timer for you on?

[–] ewoksarebased@lemmy.ml 1 points 1 day ago (3 children)

Got scared in another posts comment section that btrfs needs "so much" maintenance and got suggested that I should use something like this. I use Fedora btw.

[–] talkingpumpkin@lemmy.world 3 points 1 day ago

fstrim is most probably already handled.

If you are adding a btrfs disk to an existing install you might want to check if there's a systemd unit that runs btrfs scrub: run systemctl list-units '*btrfs*' and see what it prints.

For btrfs balance... I read that you generally don't want to run it (it can be pretty IO intensive) unless you added/removed disks or are troubleshooting. My tumbleweed does have a service that boils down to running btrfs balance weekly though (with values far below your 50; see sources available at https://github.com/kdave/btrfsmaintenance)

load more comments (2 replies)
load more comments (2 replies)