You are not logged in.
Pages: 1
I've just run
sudo fstrim -v -allit said that about 40 GB has been trimmed. On the other hand, the journal says fstrim did run 3 days ago:
kwi 25 09:36:42 arch systemd[1]: Starting Discard unused blocks...
kwi 25 09:36:46 arch systemd[1]: Started Discard unused blocks.What's going on in here?
Offline
Fstrim always shows that it trimmed the entire size of the disk's free space. I do not know why but this seems to be the output of the command. Maybe it simply zeros all of the free space on the disk when run?
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
I ran fstrim once again now, and now "only" 644.6 MB trimmed.
Offline
I ran fstrim once again now, and now "only" 644.6 MB trimmed.
Did you reboot first? I bet if you rebooted and ran it again it would say 40GB.
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
Well, after a reboot it's something like this.
And does the periodic fstrim trim ALL disks available, or only the mounted ones?
Offline
The -a, --all option will affect all filesystems that are currently mounted.
The amount of data trimmed, as reported by fstrim, depends entirely on the filesystem. Some filesystems remember what they have trimmed before and do not trim it again. Other filesystems always trim the entire free space regardless whether it has been trimmed before. So the values reported can be very different depending on which filesystems you are using, so you should not put too much weight on this message. As long as it does not report an error it should be okay either way.
Online
Thanks. And is it possible to periodically fstrim all filesystems on the device, not only the ones mounted on boot? And is the swap fstrimmed?
Last edited by marmistrz (2016-05-01 10:10:13)
Offline
Thanks. And is it possible to periodically fstrim all filesystems on the device, not only the ones mounted on boot? And is the swap fstrimmed?
Hello!
marmistrz - you find answer to the above questions here:
- Arch Wiki: Solid State Drives, section about TRIM
- The "fstrim" manual
man fstrim Regards
Martin
Last edited by onslow77 (2016-05-01 14:31:16)
Offline
fstrim can only operate on mounted filesystems. What filesystems do you have that are not mounted? For fstrim you'll have to mount them in any case...
swap may be trimmed entirely every time you boot (if you have an fstab entry for swap, discard=once as options) - I think this is enabled by default anyhow.
Online
fstrim can only operate on mounted filesystems. What filesystems do you have that are not mounted? For fstrim you'll have to mount them in any case...
swap may be trimmed entirely every time you boot (if you have an fstab entry for swap, discard=once as options) - I think this is enabled by default anyhow.
Is this better than having just 'discard' as a mount option on your swap? I hadn't seen anything about the =once before in documentation.
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
See 'man swapon'.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Pages: 1