Am Sun, Mar 23, 2025 at 04:41:58PM -0500 schrieb Dale: > Michael wrote: > > On Sunday, 23 March 2025 01:48:01 Greenwich Mean Time Dale wrote: > >> Michael wrote: > >>> Finally, consider TRIM being run on a cron job, or better use something > >>> like the SSDcronTRIM script once a month to decide and execute fstrim if > >>> needed. > > [snip ...] > > > >> The only thing on SSD is the OS itself. I have partitions for /efi, > >> /boot with ext2, / and /var with ext4. I'll set up fstrim later on. > >> Given I have a 1TB stick and left well over 100GBs unused, I should have > >> room left over to last a while. On my todo list tho. Would once a > >> month be often enough tho? I update each weekend. Other than that, not > >> much changes really. /home and such is on spinning rust still. If I > >> did daily updates, might be a better plan. Once a week, maybe monthly > >> will be OK. > > Even once every 3-6 months would be more than enough. The SSDcronTRIM will > > check if your disk is filling up and will only run fstrim when/if it is > > needed. > > > > https://chmatse.github.io/SSDcronTRIM/ > > > That's not in the Gentoo tree. Hmmmmm.
For systemd, fstrim ships with a unit file to run it once a week. You could easily create something for cron. When my NAS is up again (my last remaining Gentoo system) I could look at how I did it. > I ran fstrim on my root and var partitions and got this. > > > root@Gentoo-1 / # fstrim -v / > /: 13.7 GiB (14676369408 bytes) trimmed > root@Gentoo-1 / # fstrim -v /var > /var: 43.9 GiB (47162359808 bytes) trimmed > root@Gentoo-1 / # > > > It looks like /var changes more than root does. The size in the output is usually simply the entire free space. AFAIK fstrim does not remember what it trimmed at the previous run. > I kinda wish I just > could run it on the whole m.2 stick and it do its thing regardless of > mount point. From the looks of the man page tho, that isn't a option. fstrim -a runs on all file systems. If there is unassigned (unpartitioned) space on your SSD, then that space is not written to anyways, thus there is no need for trimming that. -- Grüße | Greetings | Salut | Qapla’ Please do not share anything from, with or about me on any social network. “Today I watched my first porn movie.” – “And?” – “I was so young back then.”
signature.asc
Description: PGP signature