Creating a cache tier

In the last recipe, we created a pool, cache-pool, based on SSDs. We will now use this pool as a cache tier for the erasure-coded pool, EC-pool, that we created earlier in this chapter:

Creating a cache tier

The following instructions will guide you through the creation of a cache tier with the writeback mode and setting the overlay with an EC-pool:

How to do it…

  1. Create a cache tier that will associate storage-pools with cache-pools. The syntax is: ceph osd tier add <storage_pool> <cache_pool>:
    # ceph osd tier add EC-pool cache-pool
    
  2. Set the cache mode as either writeback or read-only. In this demonstration, we will use writeback, and the syntax is: ceph osd tier cachemode <cache_pool> writeback:
    # ceph osd tier cache-mode cache-pool writeback
    
  3. To direct all the client requests from the standard pool to the cache pool, set the pool overlay using the syntax: ceph osd tier set-overlay <storage_pool> <cache_pool>:
    # ceph osd tier set-overlay EC-pool cache-pool
    
    How to do it…
  4. On checking the pool details, you will notice that the EC-pool has tier, read_tier, and write_tier set as 48, which is the pool ID for the cache-pool. Similarly, for cache-pool, the settings will be: tier_of set to 47 and cache_mode as writeback. All these settings imply that the cache pool is configured correctly:
    # ceph osd dump | egrep -i "EC-pool|cache-pool"
    
    How to do it…
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.93.132