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 3 points 1 day ago (2 children)

Thanks for taking the time to write this! Now I understand my system a bit better and now kinda don't understand why would someone scare people with btrfs maintenance when it's "automated" by default. Thanks again!

[–] Ooops@feddit.org 4 points 1 day ago* (last edited 1 day ago)

Probably because people were more scared when they started. Just like you still find a lot of information how to reduce write/read accesses to your SSD to not kill it quickly while in reality an average user nowadays wouldn't be able to kill an SSD even if he tried.

[–] TrollAccount69@lemmy.ml 2 points 1 day ago

Btr is one of those things you kinda don’t need to be using unless you know exactly why you’re doing it for this reason. Because best practices and received wisdom are actively shifting (although the internet search change between COVID and now has given It the short end of the stick) it may be better to do something different instead.

Also as another user pointed out it’s likely not necessary to do anything to limit your ssd writes. Nand write failure manifests itself in the form of lack of recall when unpowered. More writes means a shorter time unpowered will surface a lack of recall. If the system is a server or other type of always on computer then the write failure will likely never happen, since the drive isn’t unpowered enough to matter.

Do be aware of read fatigue though, blocks which are read many times will return stranger values that the ssd’s controller recognizes with crc and retries. This manifests as slowness to the user. If something seems laggy or slow it’s a good idea to run a program called spinrite on its “lvl 3” mode, which reads every block on the drive and rewrites it. You can do similar things with programs like dd or crystal but I tend to point people at spinrite because it’s hard to fuck up and very consistent.