2.4. Discard Unused Blocks
- Batch discard operations are run explicitly by the user with the
fstrimcommand. This command discards all unused blocks in a file system that match the user's criteria.
- Online discard operations are specified at mount time, either with the
-o discardoption as part of a
mountcommand or with the
discardoption in the
/etc/fstabfile. They run in real time without user intervention. Online discard operations only discard blocks that are transitioning from used to free.
/sys/block/device/queue/discard_max_bytesfile is not zero.
- a device that does not support discard operations, or
- a logical device (LVM or MD) comprised of multiple devices, where any one of the device does not support discard operations
fstrim -v /mnt/non_discardfstrim: /mnt/non_discard: the discard operation is not supported
mountcommand allows you to mount a device that does not support discard operations with the