Using fstrim
to Discard Unused Blocks
WARNING:
This documentation is a draft and is not meant for production use. Branch: OL10-FSADMIN
The fstrim
command is used to discard unused blocks on a file
system, which can improve performance and reduce wear on storage devices based on flash
technology, such as solid-state drives (SSDs) and NVMe.
The fstrim
command only works on file systems and devices that can
support the feature. If you run the command for a device that doesn't include the
discard feature, an error message is returned.