Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Last active February 11, 2019 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseivanlopez/f4d5d318b31dd536d5f5f4333b91a25e to your computer and use it in GitHub Desktop.
Save joseivanlopez/f4d5d318b31dd536d5f5f4333b91a25e to your computer and use it in GitHub Desktop.

Bcache

Bcache technology allows to speed up the access (read and write) for slow devices. The idea consists on using a fast device (e.g., SSD) as caching device.

(slow hard disk)   (faster device, SSD)
    /dev/sda            /dev/sdb
      |                     |
[Backing device]    [Caching device]  <-- Actually, this is is set of caching devices (Caching Set)
      |                     |
      |__________ __________|                   
                 |
              [Bcache]
           /dev/bcache0

Bcache without Caching Device

If you are thinking about using bcache later, it is recommended to setup all your slow devices as bcache backing devices without a cache, and you can choose to add a caching device later.

(slow hard disk)   
    /dev/sda            
      |                     
[Backing device]    
      |                     
      |__________ __________|                   
                 |
              [Bcache]
           /dev/bcache0

Flash-only Bcache

A Flash-only Bcache is an special type of bcache. It has no backing device, and it is directly created over a caching set.

                   (faster device, SSD)
                        /dev/sdb
                            |
                    [Caching device]
                            |
      |__________ __________|                   
                 |
         [Flash-only Bcache]  <-- (WIP, seems that supports thin-provisioning)
           /dev/bcache0

YaST Status before this sprint

Supported by libstorage-ng

  • Probe Bcache devices (with and without caching device)
  • Create Bcache devices (with and without caching device)
  • Delete Bcache devices

Supported by Expert Partitioner

  • Show Bcache devices witho and without caching device
  • Create/delete Bcache with caching device

Pending in libstorage-ng

  • Probe Flash-only Bcache
  • Create/Delete Flash-only Bcache
  • Use bcache command instead of echo 1 > /sys/...
  • Support of Compound Actions for Bcache without caching device
  • Support of Compound Actions for Flash-only Bcache

Pending in Expert Partitioner

  • Show Flash-only Bcache devices
  • Create Bcache without caching device
  • Create/Delete Flash-only Bcache
  • Modify Bcache devices (e.g., change the caching device or caching mode)

Done during this sprint

libstorage-ng

  • Probe Flash-only Bcache
  • Create/Delete Flash-only Bcache (still pending)
  • Use bcache command instead of echo 1 > /sys/...
  • Support of Compound Actions for Bcache without caching device
  • Support of Compound Actions for Flash-only Bcache

Expert Partitioner

  • Show Flash-only Bcache devices
  • Create Bcache without caching device
  • Create/Delete Flash-only Bcache (still pending)
  • Modify Bcache devices (still pending)

PBIs

Screenshots

virtualbox_opensuse tumbleweed_07_02_2019_15_59_47

virtualbox_opensuse tumbleweed_08_02_2019_10_02_39 virtualbox_opensuse tumbleweed_08_02_2019_09_50_30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment