Sample Header Ad - 728x90

How to get the stats of an lvm cache?

2 votes
0 answers
122 views
I am using an lvm cache in the most usual combination (small, fast ssd before a huge, slow hdd). It is simply awesome. However, I have not found a way to know, how many blocks are actually cached and how. What is particularly interesting: 1. Size of the read cache. These are the blocks on the ssd which are the same as the corresponding hdd block. 2. Size of the write cache. These blocks are the result if a write operation to the merged device, they are different on the ssd as on the hdd, and once (as there will be resources for that) will need to be synced out. My research found that lvm-cache is using device mapper below, more exactly the dm-cache driver. A
table
command is enough to get some numbers, but there is no way to know, exactly which number means what. I think, there should exist some lvm-level solution for the task.
Asked by peterh (10448 rep)
May 25, 2025, 02:24 PM