<p dir="ltr"><br>
On 26/04/2013 9:49 AM, "Josu Lazkano" <<a href="mailto:josu.lazkano@gmail.com">josu.lazkano@gmail.com</a>> wrote:<br>
><br>
> Hello, thanks for the reply.<br>
><br>
> 2013/4/25 Igor Cicimov <<a href="mailto:icicimov@gmail.com">icicimov@gmail.com</a>>:<br>
> ><br>
> > To optimize the SSD performance you need to enable TRIM for your SSD. You<br>
> > can check for it like this:<br>
> ><br>
> > # hdparm -I /dev/sdb | grep -i trim<br>
> > * Data Set Management TRIM supported (limit 8 blocks)<br>
> > * Deterministic read data after TRIM<br>
><br>
> This is the output of the command:<br>
><br>
> # hdparm -I /dev/sda | grep -i trim<br>
> * Data Set Management TRIM supported (limit unknown)<br>
><br>
> Is this OK?<br>
><br>
Yes</p>
<p dir="ltr">> ><br>
> > Then you need to add the 'discard' option to the partitions on the SSD drive<br>
> > in /etc/fstab. On my system:<br>
> ><br>
> > # / was on /dev/sdb2 during installation<br>
> > UUID=7a71b85c-42e6-4135-b117-b4505cdbfd6e / ext4<br>
> > errors=remount-ro,discard 0 1<br>
> > # /home was on /dev/sdb4 during installation<br>
> > UUID=0a7b2dec-a8e4-4634-bc3b-3f67bcb41443 /home ext4<br>
> > defaults,discard 0 2<br>
> ><br>
> > but you need ext4 for this. You can also add 'noatime' too to the options to<br>
> > reduce the SSD writes and increase its lifetime. Then reboot the system.<br>
><br>
> This is my original fstab file:<br>
><br>
> # cat /etc/fstab<br>
> UUID=3d4a3495-832b-40eb-881a-ac77497feb30 / ext4<br>
> errors=remount-ro 0 1<br>
> UUID=fda3b8ef-5fa0-49ee-a5ef-1a12e78f1db8 none swap sw<br>
> 0 0<br>
><br>
> I change it to this:<br>
><br>
> # cat /etc/fstab<br>
> UUID=3d4a3495-832b-40eb-881a-ac77497feb30 / ext4<br>
> errors=remount-ro,discard,noatime 0 1<br>
> UUID=fda3b8ef-5fa0-49ee-a5ef-1a12e78f1db8 none swap sw<br>
> 0 0<br>
><br>
> Is this correct?<br>
><br>
Yes but you need remount/reboot for that to take effect.</p>
<p dir="ltr">> > To see the trimming in action you can run:<br>
> ><br>
> > # fstrim -v /<br>
> > # fstrim -v /home<br>
><br>
> I don't understand fstrim commands, this my output:<br>
><br>
> # fstrim -v /<br>
> /: 48443392 bytes were trimmed<br>
><br>
> What that is means? Is this correct?<br>
><br>
Means trimming is working.</p>
<p dir="ltr">> > You can also set the above as a daily cronjob if you want to execute<br>
> > trimming on runtime apart from boot time.<br>
> ><br>
> ><br>
> > In case you have a bad inodes or any kind of filesystem corruption I would<br>
> > recommend to reset the SSD to factory settings. The SSD after booting is<br>
> > protected by the BIOS so you need to boot with the SSD disconnected (from<br>
> > live cd probably), then connect it and execute the following procedure<br>
> > (replace sdb with what ever it shows up on your system, run blkid to find<br>
> > it):<br>
> ><br>
> > # dcfldd if=/dev/zero of=/dev/sdb bs=4k<br>
> > # hdparm --user-master u --security-set-pass Eins /dev/sdb<br>
> > # hdparm --user-master u --security-erase Eins /dev/sdb<br>
> ><br>
> > and then set your fstab as above (and don't forget to replace sdb and UUID<br>
> > as appropriate for your case) and reboot.<br>
><br>
> If a do this steps, will I erase all data of the disk?<br>
> <br>
Yes</p>
<p dir="ltr"> > Is this necessary?<br>
><br>
Only if you think you have corrupt file system.</p>
<p dir="ltr">> > Hope this helps.<br>
> ><br>
> > Igor<br>
><br>
> Thank you very much for your great reply.<br>
><br>
> Best regards.<br>
><br>
> --<br>
> Josu Lazkano<br>
> _______________________________________________<br>
> mythtv-users mailing list<br>
> <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
</p>