2

Because my notebook has a SSD and a HDD, I want use the SSD as cache just like Rapid Storage in windows. I find bcache offers this functionality so I decide to try it.

I got bcache and bcache-tools via git then followed the guide at:

http://evilpiepirate.org/git/linux-bcache.git/tree/Documentation/bcache.txt

Getting started:
You'll need make-bcache from the bcache-tools repository. Both the cache device
and backing device must be formatted before use.
  make-bcache -B /dev/sdb
  make-bcache -C -w2k -b1M -j64 /dev/sdc

Does that mean I have to format the whole HDD to enable the bcache?

Vincent Yu
  • 1,087
user106561
  • 21
  • 1
  • 2

3 Answers3

8

There is no need for a fresh install. See the blocks README and the bcache FAQ. To enable bcache on your root filesystem, you would convert the root device with blocks, whether or not you have a fresh install.

ObDisclaimer: I wrote the conversion tool.

Gabriel
  • 719
  • 7
  • 9
3

Does that mean I have to format the whole HDD to enable the bcache?

That's certainly what is suggested, yes. This is fairly common in RAID-like situations. You start by generating a new mapped bcache device and then you format that, instead of the hardware directly.

However, the other RAID-like things (mdadm, dmraid, etc.) have documentation that make it quite clear how you create one of these setups and then install on top of it (and have initramfs load the right stuff so you can boot!)

I'm fairly experienced messing around with bizarre file system arrangements and kernel modules, but even I wouldn't want to touch this, especially not if I was trying to retrofit it into an existing installation.

I would concentrate on what I've got in front of me. If your SSD is fast and of a moderate size ~10GB+, stick Ubuntu on there and host /home on the spinning rust. That should give you some room for installing things, though you might have to move /opt to rust at some point. It may seem complicated now, but it's quite easy to split an installation over multiple disks.

If the SSD is tiny (<8GB) and/or slow, it may be worth considering just not using it.

Oli
  • 293,335
  • My SSD is 32G and it run quite well in Rapid Storage on windows. But I still confused about bcache. Is there any one who has tried bcache? – user106561 Nov 09 '12 at 14:32
0

Another option that don't require you to do a fresh install (given that you use ext3 or 4) is to move the journal to ssd, and add data=journal for the different filesystems you have. For the rootfilesystem this has to be added as a kernel parameter rootflags=data=journal .

More about this can be read on http://insights.oetiker.ch/linux/external-journal-on-ssd/