[mythtv-users] SSD disk for the frontend

Rich West Rich.West at wesmo.com
Thu Apr 25 02:15:45 UTC 2013


On 4/24/2013 9:58 PM, Igor Cicimov wrote:
> On Thu, Apr 25, 2013 at 9:26 AM, Josu Lazkano <josu.lazkano at gmail.com
> <mailto:josu.lazkano at gmail.com>> wrote:
>
>     Hello,
>
>     I want to configure a frontend with a ION1 board and SSD disk.
>
>     The disk is a 8GB, is enought to put a clean xfce on a Debian Wheezy.
>     Every time I install and use it for some days, it stop to boot because
>     a inodes corruption, I use to execute fsck but it didn't work well.
>
>     How could I configure the disk? Just read-only mode?
>
>     I am using 4GB of memory on it and I use to shutdown when don't
>     watching the TV.
>
>     How could I test the health of the disk?
>
>     I will appreciate any help.
>
>     Thanks and best regards.
>
>     --
>     Josu Lazkano
>
>
> To optimize the SSD performance you need to enable TRIM for your SSD. You
> can check for it like this:
>
> # hdparm -I /dev/sdb | grep -i trim
>   *Data Set Management TRIM supported (limit 8 blocks)
>   *Deterministic read data after TRIM
>
>
> Then you need to add the 'discard' option to the partitions on the SSD
> drive in /etc/fstab. On my system:
>
> # / was on /dev/sdb2 during installation
> UUID=7a71b85c-42e6-4135-b117-b4505cdbfd6e /               ext4  
>  errors=remount-ro,discard 0       1
> # /home was on /dev/sdb4 during installation
> UUID=0a7b2dec-a8e4-4634-bc3b-3f67bcb41443 /home           ext4  
>  defaults,discard        0       2
>
> but you need ext4 for this. You can also add 'noatime' too to the options
> to reduce the SSD writes and increase its lifetime. Then reboot the system.
>
> To see the trimming in action you can run:
>
> # fstrim -v /
> # fstrim -v /home
>
> You can also set the above as a daily cronjob if you want to execute
> trimming on runtime apart from boot time.
>  
>
> 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):
>
> # dcfldd if=/dev/zero of=/dev/sdb bs=4k
> # hdparm --user-master u --security-set-pass Eins /dev/sdb
> # hdparm --user-master u --security-erase Eins /dev/sdb
>
> and then set your fstab as above (and don't forget to replace sdb and UUID
> as appropriate for your case) and reboot.
>
> Hope this helps.
>
> Igor
>


In addition to what Igor posted, I also enable tmpfs for those noisier
directories.  It's a simple change which points those directories to RAM,
but it makes the contents of those directories expendable since they get
reset with each system reboot.  Considering that they are simple frontends,
you probably don't need the logs unless you are debugging anyhow..
tmpfs   /tmp    tmpfs   defaults        0       0
tmpfs   /var/log        tmpfs   defaults        0       0

-Rich


More information about the mythtv-users mailing list