I have the following lvm configuration.
Hard Disk: /dev/sdb (Size 10 GB)
VG: vg_root on /dev/sdb
THIN_POOL thin_pool occupying the whole physical extent
lvcreate -y --extents 100%free --thin vg_root/thin_pool
Thin volume on the thin pool
lvcreate --name lv_1 --virtualsize 1GB --thinpool vg_root/thin_pool
Another thin volume on the thin_pool
lvcreate --name lv_2 --virtualsize 2GB --thinpool vg_root/thin_pool
mount and create a file of 1 GB on the volume
Snapshot volume for lv_2
lvcreate -y --setactivationskip n --snapshot --thinpool vg_root/thin_pool vg_root/lv_2 --name snapshot_1
mount and create a file of 250MB on the volume
I assume the actual used space by snapshot_1 will be 250MB and not (1GB + 250MB). Is there a way to figure out the actual physical used space on snapshot_1 (250 MB).
thin_dump -f xml /dev/mapper/vg_root_thin_pool_tmeta
I will continue with on the same question, as these could be linked. Let me know if need to seperate out the next question:
dumps information about the logical volumes.
begin superblock: "", 3, 8, 128, 326976
device: 1
mapped_blocks: 60
transaction: 0
creation time: 0
snap time: 0
(0..1) -> (0..1), 0
2047 -> 58, 0
4094 -> 57, 0
6141 -> 52, 0
How do we map the device id to the lvm volume ?