Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-21-2016, 02:25 AM   #1
Kevin Williams
LQ Newbie
Registered: Dec 2015
Location: Earth
Distribution: Linux Lite 2.4
Posts: 10

Rep: Reputation: Disabled
Move Kodi thumbnail cache to ram in Linux Lite to reduce ssd drive wear.

Hi folks;

Here is my issue, I have Kodi installed in single partition with Linux Lite running as main os in chromebox. As you all know, Kodi constantly writes thumbnail images to the solid state drive each time a user loads an addon and brings up the updated video list. That action causes the solid state drive to gradually wear out. So in order to prevent this from happening I'd like to move the Kodi thumbnail folder to ram in Ubuntu.

In the process of finding a possible solution this problem I found the follwing in the Kodi tv forum :

Create the script below as /etc/init.d/thumbnails

case "$1" in
rsync -a /home/xbmc/.xbmc/userdata/Thumbnails.disk/ /dev/shm/Thumbnails/
rsync -a /dev/shm/Thumbnails/ /home/xbmc/.xbmc/userdata/Thumbnails.disk/

Make it executable:
chmod +x /etc/init.d/thumbnails

Create the init.d links:
sudo update-rc.d thumbnails defaults

Go to your XBMC Userdata folder:
cd ~/.xbmc/userdata

Rename the Thumbnails folder:
mv Thumbnails Thumbnails.disk

Create a Thumbnails link to /dev/shm:
ln -s /dev/shm/Thumbnails Thumbnail

This copies the Kodi cache to RAM when the system boots up, and copies it back to disk when the user shuts down his pc. This way, the cache doesn't have to be rebuilt every-time the user reboots his pc.

It sort of defeats the purpose because this copies Kodi's cache to disk upon shut down. So what else do you guys recommend I do ? Is the possible solution I found good for my situation ?

Last edited by Kevin Williams; 01-21-2016 at 02:35 AM.
Old 01-21-2016, 02:36 AM   #2
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448

I've often setup a ramdisk for /tmp. You could use the same thing with that directory. Add this to /etc/fstab

tmpfs /home/xbmc/.xbmc/userdata/Thumbnails.disk/ tmpfs defaults 0 0

It will be empty every time you boot, but I guess that's not a problem?
1 members found this post helpful.
Old 01-21-2016, 02:44 AM   #3
Kevin Williams
LQ Newbie
Registered: Dec 2015
Location: Earth
Distribution: Linux Lite 2.4
Posts: 10

Original Poster
Rep: Reputation: Disabled
Cool thanks, I will try this. If I have any other questions I will simply quote your response so you can respond to it in the near future. Thanks anyway.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I have a SSD a 500GB drive and a 2TB drive and want to move Ubuntu from 500GB to SSD greatormesby Linux - Newbie 12 07-06-2015 09:58 AM
Move to smaller SSD drive with LVM? Katari Linux - General 0 01-23-2013 09:44 PM
Need to reduce the size of a dd image file to fit onto a new smaller SSD drive bunchdaddy Linux - Desktop 3 10-06-2012 01:51 PM
Keeping your activities private on Linux - command history, shred, thumbnail cache chromei386 Linux - Security 6 12-11-2008 01:09 PM
Slow DVD-RAM writes on SuSE 64-bit with Lite-on multi drive chuckbuhler Linux - Hardware 7 03-24-2007 04:48 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration