<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3370&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [SOLVED] Moving installation to SSD drive]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3370</link>
		<description><![CDATA[The most recent posts in [SOLVED] Moving installation to SSD drive.]]></description>
		<lastBuildDate>Wed, 25 Mar 2020 04:09:25 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20710#p20710</link>
			<description><![CDATA[<div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>You don&#039;t need to run TRIM command at all if you mount filesystem with &#039;discard&#039; option.</p></div></blockquote></div><p>The <em>discard</em> option slows down the drive because TRIM is applied for all I/O operations.</p></div></blockquote></div><p>Any write operation is slowing down an SSD due to physical limitations. In practice the &#039;discard&#039; option is just convenient thing with insignificant overhead.</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Wed, 25 Mar 2020 04:09:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20710#p20710</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20588#p20588</link>
			<description><![CDATA[<div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>You don&#039;t need to run TRIM command at all if you mount filesystem with &#039;discard&#039; option.</p></div></blockquote></div><p>The <em>discard</em> option slows down the drive because TRIM is applied for all I/O operations.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Thu, 19 Mar 2020 18:29:00 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20588#p20588</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20570#p20570</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>... don&#039;t need to run TRIM command at all if you mount filesystem with &#039;discard&#039;...</p></div></blockquote></div><p>Yes, but thenI&#039;d be running <span class="bbc">trim</span> every time I booted the rig, which could be up to three or four times a day.</p><p>I&#039;m looking to analyse the <span class="bbc">/var/log/trim</span> files in a month or so to see what went on and then decide on weekly, monthly or something else.</p><p>There&#039;s a chap that wrote a daemon for running <span class="bbc">trim</span> here:</p><p><a href="https://github.com/dobek/fstrimDaemon" rel="nofollow">https://github.com/dobek/fstrimDaemon</a></p><p>He argues that it would seem to be <em>&quot;more reliable to execute fstrim based on up time then cron table.&quot;</em>.</p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Thu, 19 Mar 2020 10:56:42 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20570#p20570</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20568#p20568</link>
			<description><![CDATA[<p>You don&#039;t need to run TRIM command at all if you mount filesystem with &#039;discard&#039; option.</p>]]></description>
			<author><![CDATA[dummy@example.com (ToxicExMachina)]]></author>
			<pubDate>Thu, 19 Mar 2020 04:10:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20568#p20568</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20518#p20518</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Use a weekly cron job ...</p></div></blockquote></div><p>Done.<br />Works a treat.&#160; =-)</p><div class="codebox"><pre><code>#!/bin/sh
# trim all mounted file systems which support it
# added 20200315
#
LOG=/var/log/trim.log
echo &quot;*** $(date -R) ***&quot; &gt;&gt; $LOG
fstrim --all --verbose &gt;&gt; $LOG</code></pre></div><div class="codebox"><pre><code>groucho@devuan:~$ cat /var/log/trim.log
*** Sun, 15 Mar 2020 17:51:27 -0300 ***
/var/log: 0 B (0 bytes) trimmed
/home: 112 MiB (117415936 bytes) trimmed
/: 483.9 MiB (507346944 bytes) trimmed
groucho@devuan:~$ </code></pre></div><p>Just changed the name of the cron job so that it would not be the same as the executable.<br />Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Mon, 16 Mar 2020 02:33:13 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20518#p20518</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20504#p20504</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>I don&#039;t think it&#039;s started automatically ...</p></div></blockquote></div><p>Right. (A bit late in life but I have vowed to try to stop using OK)</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... Debian util-linux package supplies systemd timer &amp; service unit files ...<br />... but the Devuan package doesn&#039;t include those files or any cron jobs ...</p></div></blockquote></div><p>I see.</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... trimmed_log.txt file in your home directory must be for something else.</p></div></blockquote></div><p>Hmm ...<br />I&#039;ll start looking again to see if I can find out just where it comes from.</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... create a cron job for it, as I have shown.</p></div></blockquote></div><p>I was just about to do that when I found <span class="bbc">trimmed_log.txt</span>.</p><p>--- solved ---</p><p>From its content and name, it seemed (to me) that it could have been produced by <span class="bbc">fstrim</span>.<br />But it turns out that it is not.&#160; &#160;=-)</p><p>A search on the web brought up just three hits, one of them from a thread I (!) started here at Dev1.<br />So it turned out that it was right in front of me/us.</p><p>See here:<br /><a href="https://dev1galaxy.org/viewtopic.php?pid=20206#p20206" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=20206#p20206</a></p><div class="quotebox"><cite>ToxicExMachina wrote:</cite><blockquote><div><p>The simplest way to trim information from the log is awk</p><p>I suppose in the &quot;Samsung_M2020_Series groucho 109 [27/Dec/2018:08:37:02 -0300] 1 1 - localhost H:\Desktop\flower_sm.jpg A4 -&quot; entry the 6th word (in this case it&#039;s &quot;1&quot;) is the number of printed pages. Therefore the following command will give a text table with date/time and amount of printed pages found by the word &quot;A4&quot;:</p><div class="codebox"><pre><code>cat /var/log/cups/page_log | grep A4 | awk &#039;{print $4$5 &quot; &quot; $6}&#039; &gt; trimmed_log.txt  &lt;-------------- !!!</code></pre></div></div></blockquote></div><p>And here:<br /><a href="https://dev1galaxy.org/viewtopic.php?pid=20211#p20211" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=20211#p20211</a></p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>Try these instead:</p><div class="codebox"><pre><code>awk &#039;/A4/{print $4$5 &quot; &quot; $6}&#039; /var/log/cups/page_log &gt; trimmed_log.txt  &lt;-------------- !!!
awk &#039;/A4/{pages += $6} END {print pages}&#039; /var/log/cups/page_log</code></pre></div></div></blockquote></div><p>It was generated when I was trying to figure out how many pages my M2020W cartdrige had actually printed before running out.<br />Which I still have to figure out how to <span class="bbc">awk</span> properly.</p><p>Thanks a lot for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 15 Mar 2020 12:38:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20504#p20504</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20503#p20503</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>But I am still far from finding out where (in my Devuan ascii) fstrim is started and under what circumstances.</p></div></blockquote></div><p>I don&#039;t think it&#039;s started automatically at all. The Debian util-linux package supplies systemd timer &amp; service unit files to allow it to be configured to run automatically every week but the Devuan package doesn&#039;t include those files or any cron jobs to replace them.</p><p>That trimmed_log.txt file in your home directory must be for something else.</p><p>To get fstrim running every week create a cron job for it, as I have shown.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sun, 15 Mar 2020 11:38:20 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20503#p20503</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20502#p20502</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Dutch_Master wrote:</cite><blockquote><div><p>Bookmark this page ...</p></div></blockquote></div><p>Thanks ...<br />Already had it.</p><div class="quotebox"><cite>Dutch_Master wrote:</cite><blockquote><div><p>Tools to investigate ...</p></div></blockquote></div><p>Indeed ...</p><p>I use <span class="bbc">locate</span> and <span class="bbc">grep</span> every day.<br />I have used <span class="bbc">which</span>, <span class="bbc">whereis</span>, <span class="bbc">ps</span> and <span class="bbc">htop</span> at some time or another as part of a script I copied from the web.</p><p>The rest I have not come across, at least that I remember.<br />Thanks for the pointer.</p><p>But I am still far from finding out where (in my Devuan ascii) fstrim is started and under what circumstances.</p><p>One thing I found and think it is important:</p><p><a href="https://unix.stackexchange.com/questions/218076/ssd-how-often-should-i-do-fstrim" rel="nofollow">https://unix.stackexchange.com/question … -do-fstrim</a></p><div class="quotebox"><blockquote><div><p>TRIM does at least three things:</p><p>1. minimize write amplification<br />2. prevent long-term performance degradation<br />3. irrecoverably delete your data</p><p>--- snip ---</p><p>If you decide on fstrim you should know where the cron job is located so you can disable it when you have an accident, that way you get a compromise between 2) and 3).</p></div></blockquote></div><p>I would have expected to find the cron job for <span class="bbc">fstrim</span> in <span class="bbc">/etc/cron.daily</span>, <span class="bbc">/etc/cron.weekly</span> or <span class="bbc">/etc/cron.monthly</span> but it is not there.&#160; </p><p>I would like to edit the configuration file so that it logs in <span class="bbc">/var/log/fstrim.log</span> with the verbose option so I know what it is doing or even disable it.<br />Instead just basic data in <span class="bbc">trimmed_log.txt</span> in my <span class="bbc">/home</span> directory.</p><p>Any idea as to where it is in Devuan ascii?</p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sun, 15 Mar 2020 02:13:19 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20502#p20502</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20501#p20501</link>
			<description><![CDATA[<p>Bookmark this page: <a href="https://ss64.com/bash/" rel="nofollow">https://ss64.com/bash/</a></p><p>Tools to investigate (use the link, for instance) are (in no particular order):<br />which, strace, ps, whereis, grep/egrep/pgrep, lsof, locate/slocate and htop</p>]]></description>
			<author><![CDATA[dummy@example.com (Dutch_Master)]]></author>
			<pubDate>Sat, 14 Mar 2020 22:24:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20501#p20501</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20500#p20500</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... download the .deb package then unpack it and copy the script ...</p></div></blockquote></div><p>I posted and went to make myself an espresso which made my head work a bit better.</p><p>So:</p><div class="codebox"><pre><code>groucho@devuan:~$ locate trim
/home/groucho/trimmed_log.txt
/sbin/fstrim
/usr/share/bash-completion/completions/fstrim
/usr/share/man/man3/malloc_trim.3.gz
/usr/share/man/man8/fstrim.8.gz
/usr/share/tools/trim26lst
groucho@devuan:~$ </code></pre></div><p>Seems that the <span class="bbc">fstrim</span> util is in/part of the Devuan ascii distribution.<br />And from the <span class="bbc">locate</span> printout, it also seems that it <em>has</em> been run before.</p><div class="codebox"><pre><code>groucho@devuan:~$ cat /home/groucho/trimmed_log.txt
[30/Nov/2018:10:44:10-0300] 1
[08/Dec/2018:19:12:32-0300] 1
--- snip ---
[17/Feb/2020:13:44:14-0300] 1
groucho@devuan:~$ </code></pre></div><p>The trimmed_log.txt (which for some strange reason is not in /var/log) only gives date, time and what would be the <em>trim</em> (?).</p><p>But ...</p><p>I only installed the SSD yesterday, no SSDs before that, so <span class="bbc">fstrim</span> was working on some other drive.<br />I speculate that it was on the SAS drive replaced with the Kingston SSD ie: boot drive. (?)</p><p>Q:<br />1. How is fstrim set up and started?&#160; <br />2. Will it keep working now albeit on the SSD?</p><p>Some dates in <span class="bbc">/home/groucho/trimmed_log.txt</span> are far apart and there are up to 30 entries with the same date (with <em>trims</em> as high as 24 so it does not seem to be a cron job.</p><p>So if it is not a cron job, what triggers it to run and how can it be modified?</p><p>Thanks in advance,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 14 Mar 2020 21:40:53 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20500#p20500</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20499#p20499</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Can&#039;t get just the fstrim-mx by itself?</p></div></blockquote></div><p>Well you could download the .deb package then unpack it and copy the script to /etc/cron.weekly but it&#039;s more or less the same as the one I&#039;ve posted (it uses bash instead of /bin/sh for some reason though, which is slower, potentially more buggy and slightly more memory-intensive).</p><p>Don&#039;t add the <span class="bbc"># /etc/cron.weekly/fstrim</span> line if you copy my script though, that&#039;s just my lazy way of indicating the filename &amp; location.</p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 14 Mar 2020 20:58:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20499#p20499</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20498#p20498</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... a weekly cron job to run <span class="bbc">fstrim</span> ...<br />... MX Linux has one you can &quot;steal&quot; ...</p></div></blockquote></div><p>It seems that it is part of a &#039;goodies&#039; package (how I abhor this <em>goodies</em> crap) </p><p><a href="http://mxrepo.com/MX19packages.html" rel="nofollow">http://mxrepo.com/MX19packages.html</a></p><div class="quotebox"><blockquote><div><p>mx-goodies - 20.03.01<br />Version: 20.03.01<br />Section: system<br />Architecture: 32bit and 64bit<br />Description:<br />Includes:<br />* burniso (write an ISO image from cli)<br />* fancy-prompts (nine different colorful and interesting prompts)<br />* ps_initrd.sh (initrd packing/unpacking tool)<br />* zram (script to set up zram)<br />* ps_mem.py (RAM usage script)<br />* fstrim-mx (auto set up fstrim of SSE drives as a weekly cron job)<br />Homepage: <a href="http://antix.mepis.org" rel="nofollow">http://antix.mepis.org</a><br />Maintainer: anticapitalista</p></div></blockquote></div><p>Can&#039;t get just the fstrim-mx by itself? </p><div class="codebox"><pre><code># /etc/cron.weekly/fstrim
#!/bin/sh
LOG=/var/log/trim.log
echo &quot;*** $(date -R) ***&quot; &gt;&gt; $LOG
fstrim --all --verbose &gt;&gt; $LOG</code></pre></div><p>OK.</p><p>Q: how come it is not in (any realease, actually) the devuan repository?</p><div class="quotebox"><cite>Head_on_a_Stick wrote:</cite><blockquote><div><p>... don&#039;t bother following any obsolete advice ...<br />... have one of those Kingston drives and the longevity is great.</p></div></blockquote></div><p>Good to know.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 14 Mar 2020 20:52:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20498#p20498</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20497#p20497</link>
			<description><![CDATA[<div class="quotebox"><cite>Altoid wrote:</cite><blockquote><div><p>Are there any system tweaks needed to keep the SSD in proper shape?</p></div></blockquote></div><p>Use a weekly cron job to run <span class="bbc">fstrim</span> on the drive to maintain performance, MX Linux has one you can &quot;steal&quot;:</p><div class="codebox"><pre><code># /etc/cron.weekly/fstrim
#!/bin/sh
LOG=/var/log/trim.log
echo &quot;*** $(date -R) ***&quot; &gt;&gt; $LOG
fstrim --all --verbose &gt;&gt; $LOG</code></pre></div><p>But don&#039;t bother following any obsolete advice to minimise writes, I actually have one of those Kingston drives and the longevity is great. See also <a href="https://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead/" rel="nofollow">https://techreport.com/review/27909/the … -all-dead/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Head_on_a_Stick)]]></author>
			<pubDate>Sat, 14 Mar 2020 19:03:06 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20497#p20497</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20496#p20496</link>
			<description><![CDATA[<p>Hello:</p><div class="quotebox"><cite>Dutch_Master wrote:</cite><blockquote><div><p>No ...<br />Unless your system is seriously memory-starved and swap comes into play often ...</p></div></blockquote></div><p>I don&#039;t think it is the case here.</p><div class="quotebox"><cite>Dutch_Master wrote:</cite><blockquote><div><p>Flash drives do not cope too well with high read/write load cycles ...</p></div></blockquote></div><p>Yes, I had read something about that.</p><p>I&#039;ll see if I can find if there is a utility that can log swap activity (I think I saw one once ...) over a set amount of time, say 30/60/120 days and evaluate the results.<br />I have enough relatively fast SAS 3.0Gb/sec rust so I could eventually set up an 8.0Gb swap partition on one of them.</p><p>Thanks for your input.</p><p>Cheers,</p><p>A.</p>]]></description>
			<author><![CDATA[dummy@example.com (Altoid)]]></author>
			<pubDate>Sat, 14 Mar 2020 17:29:01 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20496#p20496</guid>
		</item>
		<item>
			<title><![CDATA[Re: [SOLVED] Moving installation to SSD drive]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=20495#p20495</link>
			<description><![CDATA[<p>No, not really. Unless your system is seriously memory-starved and swap comes into play often, in which case it&#039;s advisable to move it to a spinning disk instead as Flash drives do not cope too well with high read/write load cycles: it shortens their lifespan considerably. But as you stated swap is rarely used, don&#039;t bother now. My system also has an SSD for the system, including swap, but like yours it&#039;s seldom used so I don&#039;t bother about it. One of my SSD&#039;s (1st gen. consumer grade stuff, from Crucial, 60GB) lasted well over 60,000hrs before replacing it not so long ago.</p>]]></description>
			<author><![CDATA[dummy@example.com (Dutch_Master)]]></author>
			<pubDate>Sat, 14 Mar 2020 16:06:01 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=20495#p20495</guid>
		</item>
	</channel>
</rss>
