Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First of all, I'm noob on using flashcache, and all that I'll post here is studying about it.

I've an Asus K56CM, i5 with 500gb of HD and 24Gb of SSD for cache. In windows 8, the default operating system, uses Expresscache for caching the HD in the SSD.

I want to make the same in Xubuntu, and i've seen Flashcache as the better way to do this.

I've follow several manuals, but I'm loosing something.

The partitions table is:

sda      8:0    0 465,8G  0 disk 

├─sda1   8:1    0   5,9G  0 part [SWAP]
├─sda2   8:2    0 117,2G  0 part /
└─sda3   8:3    0 342,7G  0 part /home

sdb      8:16   0  22,4G  0 disk 

├─sdb1   8:17   0   250M  0 part /boot/efi
├─sdb2   8:18   0   5,9G  0 part 
└─sdb3   8:19   0  16,3G  0 part 

SDA is Hard Disk and SDB is SSD

In SDB2 I'm using gdisk for Intel Rapid Boot, and I want to cache /home in SDB3.

The walkthrough I've follow is (

 - apt-get install git-core
 - mkdir -p ~/Build/ ; cd ~/Build/
 - git clone
 - sudo apt-get install git build-essential dkms linux-headers-`uname -r` uuid-dev
 - cd flashcache
 - sudo make -f Makefile.dkms all boot_conf
 - sudo make install
 - sudo modprobe flashcache
 - sudo echo "flashcache" >> /etc/modules
 - dmesg | tail

And Flashcache is now installed. But my problem is when I create the flashcache link.

I take the UUID of SDA3 and make the flashcache_Create on SDB3:

- umount /home
- flashcache_create -p back home_cached /dev/sdb3 /dev/disk/by-uuid/XXX-XXX (the ID)

And then, I edit the FSTAB, commenting the /home mounting and adding:

- /dev/mapper/home_cached /home     reiserfs defaults        0       2

Everything ok, but now, then when I reboot system, /home is not being mounted... and I don't know why...

Any help?


PD: sorry about my english, i'm spanish :S

EDIT: Ok, I have the solution. Flashcache must be created on every reboot, so I have created an script to execute on boot. I described it here:

share|improve this question
Hmmm... I've seen the problem... When I reboot, the Mapper is deleted... and don't know why :S I've read in some sites that putting writeable is the solution... but isn't another solution? – EirisDG Oct 6 '13 at 16:14
Solution found: – EirisDG Oct 8 '13 at 22:30
Related, maybe a duplicate: How do I install and use flashcache/bcache to cache HDD to SSD? – bummi May 1 '15 at 8:22

I had the same problem; I came up with this upstart conf file which will find all flashcache drives and load them, then set sysctl settings for the drives, and then mount them. If you add more drives, all you need to do is add them to /etc/fstab and make sure they have the option nobootwait in the fourth field, e.g.

/dev/mapper/export /export ext4 nobootwait 0 1

Here's the file, which should go into /etc/init/flashcache.conf:

# flashcache - Set up flashcache devices and mount them

description "Set up flashcache devices and mount them on boot"

start on mounted


console output

    # Load any flashcache devices and get them ready to mount, then set sysctl settings.


    # Load up any flashcache devices
    for P in /dev/disk/by-id/*; do
        if flashcache_load $P 2>/dev/null; then
        echo "Loaded flashcache device from $P"

    # Now look through all WRITE_BACK devices and set the sysctl settings
    for d in $(dmsetup table | grep 'cache mode(WRITE_BACK)' | perl -pe 's@.*ssd dev \(/dev/disk/by-id/(.*?)\), disk dev \(/dev/disk/.*?/(.*?)\).*@$1+$2@'); do
        # disable writing dirty cache data at shutdown
        sysctl -w dev.flashcache.$d.fast_remove=1
        # change reclaim policy from FIFO to LRU
        sysctl -w dev.flashcache.$d.reclaim_policy=1
        # do not write "stale" data to disk until evicted due to lack of space
        sysctl -w dev.flashcache.$d.fallow_delay=0

end script
share|improve this answer

Refer to:
How do I install and use flashcache/bcache to cache HDD to SSD?

There are 2 cases to make/configure your flashcache:

  1. Caching your root device, or
  2. Caching a non-root (not mounted at /) device
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.