<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yobi.be/index.php?action=history&amp;feed=atom&amp;title=SSD</id>
	<title>SSD - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yobi.be/index.php?action=history&amp;feed=atom&amp;title=SSD"/>
	<link rel="alternate" type="text/html" href="https://wiki.yobi.be/index.php?title=SSD&amp;action=history"/>
	<updated>2026-05-24T02:09:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki.yobi.be/index.php?title=SSD&amp;diff=8607&amp;oldid=prev</id>
		<title>PhilippeTeuwen: Created page with &quot;==Resources== * http://www.linuxjournal.com/content/solid-state-drives-get-one-already ==TRIM== ===LUKS=== In /etc/crypttab, add the &quot;discard&quot; keyword for devices on SSDs:  #T...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.yobi.be/index.php?title=SSD&amp;diff=8607&amp;oldid=prev"/>
		<updated>2014-03-22T22:32:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Resources== * http://www.linuxjournal.com/content/solid-state-drives-get-one-already ==TRIM== ===LUKS=== In /etc/crypttab, add the &amp;quot;discard&amp;quot; keyword for devices on SSDs:  #T...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Resources==&lt;br /&gt;
* http://www.linuxjournal.com/content/solid-state-drives-get-one-already&lt;br /&gt;
==TRIM==&lt;br /&gt;
===LUKS===&lt;br /&gt;
In /etc/crypttab, add the &amp;quot;discard&amp;quot; keyword for devices on SSDs:&lt;br /&gt;
 #TargetName Device           KeyFile  Options&lt;br /&gt;
 sda1_crypt  UUID=...         none     luks,discard &lt;br /&gt;
===LVM===&lt;br /&gt;
In /etc/lvm/lvm.conf, add a line issue_discards = 1 in devices section:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
devices {&lt;br /&gt;
        ...&lt;br /&gt;
        issue_discards = 1&lt;br /&gt;
        ..&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===initramfs===&lt;br /&gt;
 sudo update-initramfs -u -k all&lt;br /&gt;
 shutdown -r now&lt;br /&gt;
===Testing===&lt;br /&gt;
On ext4 fs:&lt;br /&gt;
 fstrim &amp;lt;mountpoint&amp;gt;&lt;br /&gt;
Should return silently if no error&lt;br /&gt;
===Enabling===&lt;br /&gt;
Automatically by the fs: add &amp;quot;discard&amp;quot; in options in /etc/fstab&lt;br /&gt;
&amp;lt;br&amp;gt;Manually or via cron: run fstrim &amp;lt;mountpoint&amp;gt;&lt;br /&gt;
==Partitioning==&lt;br /&gt;
Make sure partitions are on a 512k boundary.&lt;br /&gt;
&amp;lt;br&amp;gt;fdisk and LVM handle it properly.&lt;br /&gt;
==Tuning==&lt;br /&gt;
* Add option &amp;quot;noatime&amp;quot; in /etc/fstab to avoid writes on SDD&lt;br /&gt;
* Avoid swap on SSD&lt;br /&gt;
* Avoid filling SSD, keep &amp;lt;80% for proper garbage collection and wear leveling&lt;br /&gt;
* No RAID (as they have no TRIM support)&lt;br /&gt;
* Bios: AHCI mode, not IDE emulation (slower, no TRIM)&lt;br /&gt;
==Health==&lt;br /&gt;
 sudo smartctl -a /dev/&amp;lt;device&amp;gt;&lt;br /&gt;
&amp;quot;Media_Wearout_Indicator&amp;quot; =&amp;gt; count down from 100 as the drive approaches the Flash wear limit&lt;/div&gt;</summary>
		<author><name>PhilippeTeuwen</name></author>
	</entry>
</feed>