<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=TRIM</id>
	<title>TRIM - revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nick-black.com/dankwiki/index.php?action=history&amp;feed=atom&amp;title=TRIM"/>
	<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=TRIM&amp;action=history"/>
	<updated>2026-07-11T17:16:43Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=TRIM&amp;diff=10572&amp;oldid=prev</id>
		<title>Dank at 01:59, 20 March 2024</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=TRIM&amp;diff=10572&amp;oldid=prev"/>
		<updated>2024-03-20T01:59:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:59, 20 March 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A device which doesn&amp;#039;t support TRIM will be rejected by &amp;lt;tt&amp;gt;fstrim&amp;lt;/tt&amp;gt; with an error, so it&amp;#039;s safe to run on arbitrary filesystems.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A device which doesn&amp;#039;t support TRIM will be rejected by &amp;lt;tt&amp;gt;fstrim&amp;lt;/tt&amp;gt; with an error, so it&amp;#039;s safe to run on arbitrary filesystems.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TRIM is engaged from userspace using the FITRIM ioctl.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Online mode==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Online mode==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:1.41:old-10571:rev-10572:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
	<entry>
		<id>https://nick-black.com/dankwiki/index.php?title=TRIM&amp;diff=10571&amp;oldid=prev</id>
		<title>Dank: Created page with &quot;SSDs generally need to have the blocks belonging to a file explicitly deallocated. This is done with the ATA TRIM command. Unfortunately, regular use of TRIM can have negative effects on performance (TRIM cannot be queued on some devices) and lifetime. It is thus not generally recommended to trim after every delete operation, though this can be configured (&quot;online mode&quot;). Note that trimming generally requires the filesystem to be mounted, unlike e.g. &lt;tt&gt;fsck&lt;/tt&gt;. Note...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nick-black.com/dankwiki/index.php?title=TRIM&amp;diff=10571&amp;oldid=prev"/>
		<updated>2024-03-20T01:55:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;SSDs generally need to have the blocks belonging to a file explicitly deallocated. This is done with the ATA TRIM command. Unfortunately, regular use of TRIM can have negative effects on performance (TRIM cannot be queued on some devices) and lifetime. It is thus not generally recommended to trim after every delete operation, though this can be configured (&amp;quot;online mode&amp;quot;). Note that trimming generally requires the filesystem to be mounted, unlike e.g. &amp;lt;tt&amp;gt;fsck&amp;lt;/tt&amp;gt;. Note...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;SSDs generally need to have the blocks belonging to a file explicitly deallocated. This is done with the ATA TRIM command. Unfortunately, regular use of TRIM can have negative effects on performance (TRIM cannot be queued on some devices) and lifetime. It is thus not generally recommended to trim after every delete operation, though this can be configured (&amp;quot;online mode&amp;quot;). Note that trimming generally requires the filesystem to be mounted, unlike e.g. &amp;lt;tt&amp;gt;fsck&amp;lt;/tt&amp;gt;. Note also that TRIM can have negative impacts on the security of encrypted filesystems.&lt;br /&gt;
&lt;br /&gt;
A device which doesn&amp;#039;t support TRIM will be rejected by &amp;lt;tt&amp;gt;fstrim&amp;lt;/tt&amp;gt; with an error, so it&amp;#039;s safe to run on arbitrary filesystems.&lt;br /&gt;
&lt;br /&gt;
==Online mode==&lt;br /&gt;
* Use the &amp;lt;tt&amp;gt;discard&amp;lt;/tt&amp;gt; option when &amp;lt;tt&amp;gt;mount&amp;lt;/tt&amp;gt;ing&lt;br /&gt;
* On [[ZFS]], set the &amp;lt;tt&amp;gt;autotrim&amp;lt;/tt&amp;gt; pool option&lt;br /&gt;
&lt;br /&gt;
==Explicit==&lt;br /&gt;
* &amp;lt;tt&amp;gt;fstrim -v&amp;lt;/tt&amp;gt; &amp;lt;i&amp;gt;filesystem&amp;lt;/i&amp;gt;&lt;br /&gt;
* On [[ZFS]], &amp;lt;tt&amp;gt;zpool trim&amp;lt;/tt&amp;gt; &amp;lt;i&amp;gt;poolname&amp;lt;/i&amp;gt;&lt;br /&gt;
* On md or DM, all devices in the pool must support TRIM, or it will be rejected&lt;br /&gt;
&lt;br /&gt;
==Periodic==&lt;br /&gt;
* &amp;lt;tt&amp;gt;systemctl enable fstrim.timer&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dank</name></author>
	</entry>
</feed>