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
[–] 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.

[–] warcat@lemmy.ml 6 points 1 day ago

Hello, I have been using fedora with btrfs on various old computers for a few years and never had any problems without doing maintenance (aside from backups).

[–] 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)

[–] BCsven@lemmy.ca 2 points 1 day ago

If you load a distro that already has btrfs options, they will have maintenance scripts built in. You shouldn't need to touch btrfs manually on those, other than setting if your snapshots are cleaned up by number, or by time