<div dir="ltr">On Fri, Jul 31, 2015 at 1:38 AM, B.S. <span dir="ltr"><<a href="mailto:bs27975@yahoo.ca" target="_blank">bs27975@yahoo.ca</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Be fair ... article notes bug presents itself 'if the system is using linux md raid with raid0 or raid10'.<br>
<br>
[From bug fix patch: This fixes a data corruption bug when using discard on top of MD linear,<br>
raid0 and raid10 personalities.]<span class=""><br></span></blockquote><div><br></div><div>The point here is that for the longest of time, it was thought that the issue was within the Samsung drive, when it was not. To the extent that drivers block certain drives based on such assumptions.<br><br></div><div>See below re: man page for fstrim-all. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
</span>From my reading when I first got my SSD, fstab has "defaults,noatime,nodiratime,discard" (ext4).<br></blockquote><div><br></div><div>How long have you been running with this? <br>And what drive model? <br>Does hdparm -I /dev/sdX say it has TRIM support?<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reading further, now, <a href="http://linux.die.net/man/8/mkfs.ext3" rel="noreferrer" target="_blank">http://linux.die.net/man/8/mkfs.ext3</a>, looks like discard is the default. (discard feels trim related.) I also see that mkfs defaults come from /etc/mke2fs.conf<br></blockquote><div><br></div><div>Actually, "discard" is an option for mount<br><br><a href="http://linux.die.net/man/8/mount">http://linux.die.net/man/8/mount</a><br><br></div><div>But fstrim is enabled by default in Ubuntu 14.04 and its variants. Look what is in /etc/cron.weekly/fstrim, and you will see fstrim-all.<br><br></div><div>If you check the man page for it:<br></div><div><br><a href="http://manpages.ubuntu.com/manpages/trusty/man8/fstrim-all.8.html">http://manpages.ubuntu.com/manpages/trusty/man8/fstrim-all.8.html</a><br><br></div><div>You will see:<br><br>This only runs on Intel and Samsung SSDs as some SSDs with faulty firmware may encounter data loss problems when running fstrim  under  high  I/O  load<br></div><div><br></div><div>So we are back to this selectivity per vendor thing, in utilities and in kernel drivers.<br><br></div><div>As for what is the best way to trim, this guy summarizes things well:<br><br><a href="https://sites.google.com/site/easylinuxtipsproject/ssd#TOC-Preferred-method:-by-rc.local">https://sites.google.com/site/easylinuxtipsproject/ssd#TOC-Preferred-method:-by-rc.local</a><br><br><div>You will see that he recommends running fstrim in rc.local, so it runs once at boot time.<br><br></div><div>He then recommends that you disable the weekly fstrim that is enabled by default in 14.04.<br><br></div>And for machines that are always on, he recommends a daily fstrim.</div><div><br></div><div>He also says that discard is not advised.<br><br></div><div>Now, is that the final word on the matter? Who knows? Information conflicts from various sources, and that is why I am asking the list what their experience is.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Topically, given meeting (btrfs) context ...<br></blockquote><div><br></div><div>Skipping btrfs stuff since I am not using it yet. Still on ext4.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A related thing I have recently come across, interesting for those of you still using 12.04 ... </blockquote><div><br></div><div>On some of the servers, I am still using 12.04 because of the PHP version that comes with it and it being compatible with Drupal 6.<br><br></div><div>On the laptop, where the SSD is now, I am on 14.04.</div><div>-- <br></div></div><div class="gmail_signature">Khalid M. Baheyeldin<br><a href="http://2bits.com" target="_blank">2bits.com</a>, Inc.<br>Fast Reliable Drupal<br>Drupal optimization, development, customization and consulting.<br>Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. --   Leonardo da Vinci<br>For every complex problem, there is an answer that is clear, simple, and wrong." -- H.L. Mencken<br></div>
</div></div>