<div dir="ltr">On Thu, Apr 25, 2013 at 9:26 AM, Josu Lazkano <span dir="ltr">&lt;<a href="mailto:josu.lazkano@gmail.com" target="_blank">josu.lazkano@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I want to configure a frontend with a ION1 board and SSD disk.<br>
<br>
The disk is a 8GB, is enought to put a clean xfce on a Debian Wheezy.<br>
Every time I install and use it for some days, it stop to boot because<br>
a inodes corruption, I use to execute fsck but it didn&#39;t work well.<br>
<br>
How could I configure the disk? Just read-only mode?<br>
<br>
I am using 4GB of memory on it and I use to shutdown when don&#39;t watching the TV.<br>
<br>
How could I test the health of the disk?<br>
<br>
I will appreciate any help.<br>
<br>
Thanks and best regards.<br>
<br>
--<br>
Josu Lazkano<br></blockquote><div><br></div><div style>To optimize the SSD performance you need to enable TRIM for your SSD. You can check for it like this:</div><div style><br></div><div style><div># hdparm -I /dev/sdb | grep -i trim</div>
<div><span class="" style="white-space:pre">        </span>   *<span class="" style="white-space:pre">        </span>Data Set Management TRIM supported (limit 8 blocks)</div><div><span class="" style="white-space:pre">        </span>   *<span class="" style="white-space:pre">        </span>Deterministic read data after TRIM</div>
<div><br></div></div><div style><br></div><div style>Then you need to add the &#39;discard&#39; option to the partitions on the SSD drive in /etc/fstab. On my system:<br></div><div style><br></div><div><div># / was on /dev/sdb2 during installation</div>
<div>UUID=7a71b85c-42e6-4135-b117-b4505cdbfd6e /               ext4    errors=remount-ro,discard 0       1</div><div># /home was on /dev/sdb4 during installation</div><div>UUID=0a7b2dec-a8e4-4634-bc3b-3f67bcb41443 /home           ext4    defaults,discard        0       2</div>
</div><div><br></div><div style>but you need ext4 for this. You can also add &#39;noatime&#39; too to the options to reduce the SSD writes and increase its lifetime. Then reboot the system.</div><div style><br></div><div style>
To see the trimming in action you can run:</div><div style><br></div><div style># fstrim -v /</div><div style># fstrim -v /home</div><div style><br></div><div style>You can also set the above as a daily cronjob if you want to execute trimming on runtime apart from boot time.</div>
<div style> </div><div style><br></div><div style>In case you have a bad inodes or any kind of filesystem corruption I would recommend to reset the SSD to factory settings. The SSD after booting is protected by the BIOS so you need to boot with the SSD disconnected (from live cd probably), then connect it and execute the following procedure (replace sdb with what ever it shows up on your system, run blkid to find it):</div>
<div style><br></div><div><div># dcfldd if=/dev/zero of=/dev/sdb bs=4k</div><div># hdparm --user-master u --security-set-pass Eins /dev/sdb</div><div># hdparm --user-master u --security-erase Eins /dev/sdb</div></div><div>
<br></div><div style>and then set your fstab as above (and don&#39;t forget to replace sdb and UUID as appropriate for your case) and reboot.</div><div style><br></div><div style>Hope this helps.</div><div style><br></div>
<div style>Igor</div><div style><br></div><div style><br></div></div></div></div>