How did you manage to do it?
There is a conversion tool for enabling bcache on an existing device (disclosure: I wrote it). It's also the way to go for fresh installs, since current distro installers don't know how to create bcache devices (in which case: start by installing to the HDD).
bcache requires Linux 3.10 or newer, which is in saucy, and can be manually installed from
http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=M;O=D (look for the newest tagged release, currently
Prior warning: bcache can not be used for your existing Ubuntu installation. If you need SSD caching for your operating system you should wait for a future or special version of the Ubuntu installer which could set up your SSD cache. See this answer by Oli here: Does bcache require a fresh installation?
For everyone else who wants a bcache drive for non-OS data:
The first thing to do is upgrade your kernel if your using 13.04 or older using the kernel mainline PPA. Instructions for using this can be found here:
Make sure you select the 3.9 or higher kernel when booting or it won't work and your drive will disappear.
Install bcache-tools, at the moment you will have to install from the git repository:
If you manage to package
Once you have all the tools in place, you're ready to try and follow the guide here:
This guide shows how to format the drives (SSD AND hard drive) and then attach them together to make a new device block using bcache. Post a comment if you find the instructions confusing and I'll update this answer with simplifications.
Well, we got a bcache answer but no flashcache answer. I chose flashcache because I already had an existing installation, so bcache was out of the question. To me it seemed easier to set up as well. I chose the DKMS method so I wouldn't be stuck rebuilding the module/tools every time I got a kernel upgrade.
These steps are outlined in README-DKMS on Github.
Building the Module
Creating a flashcache device
(In this example I use writeback caching -- the default -- but flashcache can do writearound and writethrough as well)
Caching a non-root (not mounted at /) device
Caching your root device
There are a few more steps if you're caching your root device. You will need an Ubuntu LiveCD/USB for this section.
Caveats when using the root device
One minor annoyance when flashcache is used for the root device is that grub-probe fails to detect the root device and can mess up your boot menu so that you have two Ubuntu entires. But, it shouldn't matter which you use in all reality since the
i thought I would come here and comment on what occurred to me when I installed a new kernel. I was using flashcache for my /home/ folder partition only. I installed a new kernel, booted into it and it stopped during bootup and said it couldn't find /dev/mapper/home_cached, there are 3 choices you have when you recieve this message and I choose the option to log in as root and attempt to fix it. I first attempted to load the flashcache module and it said it couldn't find it. So i figured I would have to compile and install it for this new kernel I just installed. i still had the /flashcache/ folder located within /root/ so I cd'd into it and ran
then I ran
then I loaded the flashcache module with
then i just had to load my existing flashcache device which was
then just mount my home partition with
then exit out of being logged in as root with exit on the command line and it should continue booting up as normal. all done!