Jörg-Volker Peetz: > > The first call of fstrim after a reboot indeed normally seems to discard all > free space of a filesystem.
It should discard all blocks that were not previously discarded. From the manpage: | fstrim will report the same potential discard bytes each time, | but only sectors which had been written to between the discards | would actually be discarded by the storage device. Further, | the kernel block layer reserves the right to adjust the discard | ranges to fit raid stripe geometry, non-trim capable devices in | a LVM setup, etc. These reductions would not be reflected in | fstrim_range.len (the --length option). AFAICT, fstrim actually currently reports the number of bytes that were really discarded and not like the manpage suggests the number of theoretically discarded blocks. At least it reports zero bytes for consecutive runs. What the manpage doesn't explain is how fstrim knows which blocks were previously discarded. Maybe this information gets lost during a reboot although I would assume that it is stored in the filesystem. I just cannot be bothered to reboot now to test this. J. -- When I am doing sex I wonder if my emotions can be detected by alien civilisations. [Agree] [Disagree] <http://www.slowlydownward.com/NODATA/data_enter2.html>
signature.asc
Description: Digital signature