On the ext4 filesystem, the `discard` flag can also be set as a [default mount option](https://wiki.archlinux.org/title/Access_Control_Lists#Enable_ACL) using *tune2fs*:
# tune2fs -o discard /dev/sd**XY**
However, when i tried that tune2fs command on my swap partition it didn’t work, viz:
[marvin@the door ~]$ sudo tune2fs -o discard /dev/sda4
tune2fs 1.46.5 (30-Dec-2021)
tune2fs: Bad magic number in super-block while trying to open /dev/sda4
/dev/sda4 contains a swap file system labelled 'swap'
So i skip read to the end and there doesn’t seem to be any mention of settings when a swap drive is an SSD.
Help! Please tell me i don’t need to ask Debbie McGee.
That is because it is a swap partition and not an esxt4 partition.
Generally speaking, enabling the fstrim timer is all you need to do to get trimming running on all your partitions which support trim. systemctl enable --now fstrim.timer
You shouldn’t need to set discard flags.
Also, I will reiterate what someone else said in another topic that you are much more likely to get proper attention and better help if you use descriptive titles.
Sorry @dalto my brain has stopped working but i really should have realised that myself, Mea culpa. Ditto my bad re the thread headline, which i have now changed.
Honest. I did change it.
Although i might then have updated a post too before saving.
Sorry i’m trying to read ten things at once and think what else i need or missed and, until i few mins ago, in a house of chaos (my daughter & her fam are staying with me atm so we are rather over-crowded with complete insanity too).
Altered post header for the second time (and this time i checked).
Just a thought, is there a smiley for a Deliverance style grin?