kb:How to see disk space used by LVM thin template VM

Andrew Hart

Member
Dec 1, 2017
68
11
8
53
Since it took me an hour to work out how to do this...

lvs does not show disk space used in Data%:


root@hack1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-100-disk-2 data Vri---tz-k 20.00g thindata
thindata data twi-aotz-- 3.00t 0.28 0.59

Activate doesn't work?
root@hack1:~# lvchange -a y data/base-100-disk-2
root@hack1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-100-disk-2 data Vri---tz-k 20.00g thindata
thindata data twi-aotz-- 3.00t 0.36 0.59

-K means ignore the k Attr
root@hack1:~# lvchange -K -a y data/base-100-disk-2
root@hack1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-100-disk-2 data Vri-a-tz-k 20.00g thindata 14.35
thindata data twi-aotz-- 3.00t 0.36 0.61

OK 14.35%

root@hack1:~# lvchange -K -a n data/base-100-disk-2
root@hack1:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
base-100-disk-2 data Vri---tz-k 20.00g thindata
thindata data twi-aotz-- 3.00t 0.36 0.62