OpenELEC Forum
USB Flash drive as cache - Printable Version

+- OpenELEC Forum (
+-- Forum: Generic Forum (
+--- Forum: STORAGE (
+--- Thread: USB Flash drive as cache (/showthread.php?tid=76959)

USB Flash drive as cache - rjbathgate - 05-23-2015


I'm looking at improving the caching of my Raspberry Pi 2 for video streaming purposes.

Looking at this:

The option to set the buffer size (cachemembuffersize) as 0 results in the local hard drive being used for cache, opening up a massively larger amount of cache memory.

However, this would obviously increase wear and tear on the SD card.

So, I was wondering how to then use a USB flash drive for the cache.

Options I'm thinking are:

Boot to the Flash Drive (as per

or change the storage partition to a USB stick (as per

What I'm unsure on is... whether these two processes are actually same same but different. Or more to the point, which solution will actually result in the cache partition/location being now on the USB stick. No point setting it to boot from USB flash, or moving /storage/ to flash if it still uses it's internal SD card for the caching.

And, on that note, would there be anyway to determine the cache location, if I did set cachemembuffersize to 0 (thus using entire 'HDD')

Any advice, most appreciated.

Thanks in advance

Oh, and I know the USB stick might still suffer from using it as cache, but they are cheaper and very easy to duplicate so I have master img lying as backup :-)

USB Flash drive as cache - chewitt - 05-23-2015

I haven't read the articles, but since pi boards *cannot* boot from a USB (only an SD card) it must be the same process for moving /storage to USB.

USB Flash drive as cache - rjbathgate - 05-23-2015

Thanks for the quick reply.

Yes, it's not changing where it boots from:

Quote:The first thing to understand here is that a Raspberry Pi is currently incapable of booting without an SD card. So although you can move your filesystem to a USB, you still need to keep the SD card plugged in.

So, I guess my question is moving the filesystem to a USB stick (through either of those methods I guess) going to mean if I set cachemembuffersize = 0 will it use the /storage/ mount (now on USB) or will it continue to use some other mount of the SD card for cache?

In otherwords, where does it store cache when cachemembuffersize = 0 (i.e. on HDD) - because if it's somewhere within /storage/ then it'll confirm it'll go to the USB.

But without a way of knowing for sure, I could end up still using the SD for cache and wreaking it.


USB Flash drive as cache - chewitt - 05-23-2015

it always uses /storage so will use the USB if that's where /storage has been moved to