Hey!
Recently my OSMC installation crashed. Turns out the issue was that I ran out of space on my SD-card. The reasons were numerous (cache files, tmp files, an old src folder) but the single largest culprit? Thumbnails!
My Kodi thumbnails folder was 1.2 gb which is a bit on the hefty side…
The solution for me was to move the folder off my SD card and somewhere more spacious…
Prerequisite: Have somewhere to move the thumbnails
You could use a thumb drive or usb hdd or do as I did and move it to a NAS.
If you want to use a NAS you need to mount it to the OSMC filesystem to be able to use symlinks properly.
This carries a lot of other benefits and if you’re storing your media on a NAS it might be a good idea to mount it to your file system and then point OSMC to that mount point instead of directly to the network drive.
You do this by editing your fstab file:
sudo vi /etc/fstab
And on a new line add
<NAS ip>:<directory of your NAS to mount> <directory to mount the NAS as> nfs hard,sync,intr,rw,x-systemd.automount,noauto
Now you reboot your machine so that the changes take effect before we start
Copy the Thumbnails directory
sudo cp -a /home/osmc/.kodi/userdata/Thumbnails/. <USB drive or nas directory>/Thumbnails
Backup Thumbnails
You should this out before you take the plunge, so instead of removing the Thumbnails folder now you move it:
mv ~/nosejob/Other/OSMC/Thumbnails ~/nosejob/Other/OSMC/ThumbnailsBackup
Link the directories
Now you symbolically link the directories.
ln -s ~/nosejob/Other/OSMC/Thumbnails ~/.kodi/userdata/Thumbnails
This means that the Thumbnails directory in your user data directory will reflect whatever is present at the destination of the symlink, it IS NOT linked to that folder - i.e. if you move the directory on the NAS/USB your Thumbnails folder will appear empty, so if you want to move it you’d need to remove the link and make a new one.
Test it out
Reboot and then take it for a spin, browse around your tv-shows for example, do episode thumbs display properly - No lag? You can proceed to the next step. (If this laggy for you, just remove the symlink and move back the directory)
Free up that space
Before you free up that space, just for funsies run
df -h
To see how much space you have on your sd-card, now remove the backup folder and check again
sudo rm -R ~/nosejob/Other/OSMC/ThumbnailsBackup
df -h
###Enjoy that precious space!
Note: I’m using my NAS to store my thumbnails and haven’t noticed any lag at all