How to calculate free space in thin pool LV

You can calculate free space in thinpool LVM by using the following command:

# dmsetup status
[... ]
vg1-poolB-tpool: 0 45135824 thin-pool 1 4773/178944 90879/206109 - rw discard_passdown queue_if_no_space - 1024

In the above output, 206109 are the total available extents and 90879 are the free extents. You can now find the chunk size as follows:

# lvs -o chunk_size vg1/poolB
Chunk
64.00k

Then total free space should be 5,816,256k.

Leave a Reply