trim.8: minor update for manual page

Further explain that trim(8) is not for trimming free blocks
in populated file systems/ZFS pools, as people still take it wrong sometimes.

MFc after:	1 week
This commit is contained in:
Eugene Grosbein
2025-12-09 21:47:26 +07:00
parent 5e2bbfe387
commit dbc4a1c691
+13 -3
View File
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.Dd October 1, 2025 .Dd December 9, 2025
.Dt TRIM 8 .Dt TRIM 8
.Os .Os
.Sh NAME .Sh NAME
@@ -51,11 +51,21 @@ utility erases specified region of the device.
It is mostly relevant for a storage that implements trim (like flash based, It is mostly relevant for a storage that implements trim (like flash based,
or thinly provisioned storage). or thinly provisioned storage).
.Sy All erased data is lost. .Sy All erased data is lost.
Alternatively, refer to the .Pp
The
.Nm
utility should not be used upon mounted file system or active devices
being a part of imported ZFS pool or other software RAID, and the kernel
does not permit such usage generally.
If used upon not mounted file system
of inactive device, the
.Nm
utility erases blocks non-selectively, whether a block is occupied or not.
Refer to the
.Xr fsck_ffs 8 .Xr fsck_ffs 8
command having a flag command having a flag
.Fl E .Fl E
to trim populated UFS, and to the to trim free blocks inside populated UFS, and to the
.Xr zpool-trim 8 .Xr zpool-trim 8
command to trim existing ZFS pool. command to trim existing ZFS pool.
.Pp .Pp