this post was submitted on 09 Jun 2023
7 points (100.0% liked)

Free and Open Source Software

17938 readers
15 users here now

If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

I have 3TB as the main active storage on my workstation, across two SSD's, now I know that defraging and SSD has no point, in fact just adds additional wear and tear. I was wondering should I be doing any maintenance to my file systems /root /home /.snapshot, on the SSD's. they have been working for three years now with no problems or errors but just wondered what others thought

top 2 comments
sorted by: hot top controversial new old
[–] fouc@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Set up fstrim to run once a week or so and scrub your disks periodically. It will not fix any errors unless you have a RAID but it will still tell you if there are any corrupted blocks. If you delete large blocks of data you might want to rebalance every now and then. You really shouldn't need to do maintenance on a filesystem.

[–] khalil 1 points 1 year ago

I'd mostly focus on scrub, but I'll also recommend that you keep an eye on your unallocated blocks, running out of them can get you into out-of-space situations that are non-trivial to fix. My general recommendation is about 5G per device, that should give it enough breathing room that it won't -ENOSPC on most workloads. Also, please note that unallocated space is a subset of free space, that is, all unallocated space is free space but the inverse isn't true.

Getting more unallocated space is as easy as running a balance with a filter, say "btrfs balance start -dusage=10 /mountpoint". Just don't balance metadata unless you want to convert it.

Regarding defrag, I still defrag databases, system journal files, etc, even on SSDs. Those workloads tend to cause a lot of fragmentation that can impact your performance (try reading your journalctl logs before and after a defrag, as an example).

load more comments
view more: next ›