UFS Detecting Periodic Trim of SSD under UFS

I have begun migrating my three laptops from Devuan to FreeBSD. After reviewing the very helpful user manual and other readily available resources, I got one laptop (Dell Latitude E6400) up and running a couple of months ago. It is a single-user machine running a single 500GB SSD. I have it set up with a single UFS partition (using a file for swap) running soft updates but not continuous trim.

I use the machine for building wiki-type knowledge bases for various clients. My key apps are therefore Cherrytree and Firefox. My user data is saved out to USB drives, which are formatted exFAT to be shareable with Linux and Windows machines.

Over my many years running Linux, I have typically used fstrim to do periodic trimming of my system SSD. Although there is no direct analog of fstrim in FreeBSD, I note that an -E flag was some time ago added to fsck_ffs, to permit on-demand trimming of the system drive. Based on suggestions found in this forum and elsewhere, I have tried running

#fsck_ffs -Ed /dev/ada0s1a

in single-user mode. The -d flag is added in order to generate debugging output, again at the suggestion of forum contributors. Hopefully, this would provide some feedback on the trim operation.

The command runs successfully, and announces I have a clean file system. However, I see nothing in the output that hints at any trim function output. (The actual output is too voluminous to post here.) I am looking for some mention of reclaiming unallocated blocks, or something similar. I have not found any published examples of what to expect in the debugging output.

Can anyone educate me on how I might learn what, if any, trimming has been done using the fsck_ffs command?

I have been researching this and experimenting for the past week, but am running out of ideas.

The documentation behind FreeBSD is so darn thorough and diverse, I have had no need to post questions to the forum until this issue. Sorry I haven't resolved it on my own.
 
Back
Top