此内容没有您所选择的语言版本。
Chapter 38. Removing a Cache Tier
Removing a cache tier differs depending on whether it is a writeback cache or a read-only cache.
38.1. Removing a Read-Only Cache 复制链接链接已复制到粘贴板!
Since a read-only cache does not have modified data, you can disable and remove it without losing any recent changes to objects in the cache.
Change the cache-mode to
noneto disable it. :ceph osd tier cache-mode {cachepool} noneceph osd tier cache-mode {cachepool} noneCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
ceph osd tier cache-mode hot-storage none
ceph osd tier cache-mode hot-storage noneCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the cache pool from the backing pool. :
ceph osd tier remove {storagepool} {cachepool}ceph osd tier remove {storagepool} {cachepool}Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
ceph osd tier remove cold-storage hot-storage
ceph osd tier remove cold-storage hot-storageCopy to Clipboard Copied! Toggle word wrap Toggle overflow
38.2. Removing a Writeback Cache 复制链接链接已复制到粘贴板!
Since a writeback cache may have modified data, you must take steps to ensure that you do not lose any recent changes to objects in the cache before you disable and remove it.
Change the cache mode to
forwardso that new and modified objects will flush to the backing storage pool. :ceph osd tier cache-mode {cachepool} forwardceph osd tier cache-mode {cachepool} forwardCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
ceph osd tier cache-mode hot-storage forward
ceph osd tier cache-mode hot-storage forwardCopy to Clipboard Copied! Toggle word wrap Toggle overflow Ensure that the cache pool has been flushed. This may take a few minutes:
rados -p {cachepool} lsrados -p {cachepool} lsCopy to Clipboard Copied! Toggle word wrap Toggle overflow If the cache pool still has objects, you can flush them manually. For example:
rados -p {cachepool} cache-flush-evict-allrados -p {cachepool} cache-flush-evict-allCopy to Clipboard Copied! Toggle word wrap Toggle overflow Remove the overlay so that clients will not direct traffic to the cache. :
ceph osd tier remove-overlay {storagetier}ceph osd tier remove-overlay {storagetier}Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
ceph osd tier remove-overlay cold-storage
ceph osd tier remove-overlay cold-storageCopy to Clipboard Copied! Toggle word wrap Toggle overflow Finally, remove the cache tier pool from the backing storage pool. :
ceph osd tier remove {storagepool} {cachepool}ceph osd tier remove {storagepool} {cachepool}Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:
ceph osd tier remove cold-storage hot-storage
ceph osd tier remove cold-storage hot-storageCopy to Clipboard Copied! Toggle word wrap Toggle overflow