I've tried to set up bcache in Ubuntu 14.04 with a fresh install and an empty /home
partition (/dev/sdb2
) as a backing device. I have a running system on my SSD and I'd like to use its /dev/sda2
partition to cache my /home
.
I've always managed to sort my ubuntu problems out from forums but I'm struggling to understand the basics here and need help:
What account do I need to be logged in when I set up bcache in the first place? Obviously the user created during install on
/dev/sdb2
has to be logged out for/home
to be unmounted, so I set up a temporary user account on a separate partition to do it. This seems too clumsy already.make-bcache -B
and-C
both tell me that there are non-bcache superblocks on the device so I didsudo wipefs -a
on both of the devices. The partitions then appear as unformatted without an UUID in GParted. Is this normal?If so, what happens to fstab and
/home
at boot? Do I need to use bcache's UUID in fstab? I did but the system didn't find the/home
partition upon next boot.Both
echo /dev/sdb2 > /sys/fs/bcache/register
andecho /dev/sda2 > /sys/fs/bcache/register
return 'Permission denied' messages; as I understand/sys
cannot be written to.So
echo /dev/sdb2 | sudo tee /sys/fs/bcache/register
seems to have worked.
Can someone verify this is the proper way to do it in Ubuntu?
I seem to have managed to create, register and attach the backing drive but according to the tail /sys/block/bcache0/bcache/stats_total/*
I only have bypassed data.
My whole setup is quite a mess now so any clarification would be greatly appreciated.