You are not logged in.

#1 2016-05-25 01:53:34

LeftyAce
Member
Registered: 2012-08-18
Posts: 159

Questions about bcache (and dmcrypt-luks full disk encryption)

Hi all,

I just acquired a laptop with a 128GB SSD and a 500GB traditional HDD. I would like to make the best possible use of the pair from a performance and capacity standpoint. I would also like to run full disk encryption, with /boot on an external USB key (I currently have this working w/o the SSD involved, just a single HDD).

Questions:

1) Does bcache work with suspend/resume? I'm seeing some old information that it does not. Can I write a relatively simple script that stops caching, then suspends? And then re-enables caching automatically upon resume? Any reason not to do that? Is a similar procedure available for hibernate?

2) What is the risk in configuring bcache for write-back? If I understand correctly, write-back mode means some data may sit on the cache device for a long time before making its way to the HDD. It seems like the only danger here is that if the SSD fails, the data is gone. But that is no more dangerous than running a single SSD as my only disk, right? I promise I'll run backups :-)

3) What are the disk capacity implications of running bcache? If I use the whole SSD as a cache, is my total storage capacity equal to just the capacity of the HDD? Or with write-back enabled is bcache smart enough to realize that a lot of data can just live forever on the SSD, so my capacity is SSD+HDD?

4) For full disk encryption I plan to set up bcache, which will present a "device" /dev/bcache0. I will then proceed to set up dmcrypt-luks on /dev/bcache0, and dmcrypt will have no idea that it is actually sitting on two devices, one of them cacheing the other. I think this means that only encrypted data will be sent to bcache, so it should be just as secure as regular dmcrypt-luks. Does that sound right? Any potential weird issues with bache+dmcrypt from the bootloader's perspective?

5) How difficult is it to upgrade to a larger HDD in a bcache system later on?

6) Is bcache the right solution for my configuration? I like the idea because I'm not going to have /boot on the SSD anyway (it'll be on the external key). So if I put / on the SSD and /home on the HDD, I'm not going to see much speed boost from the SSD and I'll be wasting a ton of space (my / is only 11 GB not including /home and /boot). I could maybe put / on the SSD, /home on the HDD, and /home/lefty/.cache on the SSD, but that seems really messy and it involves me guessing and making permanent decisions about what I think will be accessed most. So I think I should use bcache and let smarter people than I figure out what should be cached :-D

Any other issues I'm not thinking of?

Thanks in advance for any advice!

-Lefty

Offline

Board footer

Powered by FluxBB