On Tue, 11 Oct 2011 22:56:31 +0200, Stefan G. Weichinger wrote:

> 
> As mentioned in the systemd-posting I migrated back to an SSD today (on
> my main rig, the thinkpad uses an SSD happily for a long time now).
> 
> A feature in a local magazine updated my knowledge of how to make use of
> the TRIM-command.
> 
> It told me not to use the mount-option "discard" anymore, but run fstrim
> on the mountpoint frequently.
> 
> OK, I learn ;-)
> 
> But, AFAI understand, after trimming sectors/bytes on the
> filesystem/partition, they should be trimmed. I expect X bytes to be
> trimmed at first and if I repeat the command, I expect 0 (or something
> pretty low) bytes to be trimmed then, ok?
> 
> This is what I wonder about:
> 
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
> ~ # fstrim -v /
> /: 6195433472 bytes were trimmed
> 
> 
> I tested it with "discard" on and off.
> 
> / is ext4, yes, and on an SSD, yup.
> 
> Do I misunderstand things here?
> 
> Thanks, Stefan
> 

This seems in accordance with the fstrim man page:

"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."

What is the benefit of running fstrim manually over mounting with discard?


-- 
Neil Bothwick

PCMCIA: People Can't Memorize Computer Industry Acronyms

Attachment: signature.asc
Description: PGP signature

Reply via email to