Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer
    
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 9 '12 at 14:32

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/

share|improve this answer
    
You should probably enable journal_async_commit to make this fast. Unless you boot really old kernels, this option is a good thing to have even for single-disk ext4. –  Gabriel Oct 15 '13 at 11:15

Your Answer

 
discard

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.