Ilia Zykov
2018-10-18 22:56:04 UTC
Maybe it will be implemented later? But it seems to me a little strange when there is no way to clear the cache from a garbage.
Maybe I do not understand? Can you please explain this behavior.
For example:
I have the full cached partition, with full cache:
[***@localhost ~]# df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/test-data 12G 12G 0 100% /data
[***@localhost ~]# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data test Cwi-aoC--- 12.00g [fast] [data_corig] 99.72 2.93 0.00
[data_corig] test owi-aoC--- 12.00g
[fast] test Cwi---C--- 1.00g 99.72 2.93 0.00
[fast_cdata] test Cwi-ao---- 1.00g
[fast_cmeta] test ewi-ao---- 8.00m
[lvol0_pmspare] test ewi------- 8.00m
I clear the partition and do fstrim:
[***@localhost ~]# rm -rf /data/*
[***@localhost ~]# fstrim -v /data
[***@localhost ~]# df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/test-data 12G 41M 12G 1% /data
But the cache remained full:
[***@localhost ~]# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data test Cwi-aoC--- 12.00g [fast] [data_corig] 99.72 2.93 0.00
[data_corig] test owi-aoC--- 12.00g
[fast] test Cwi---C--- 1.00g 99.72 2.93 0.00
[fast_cdata] test Cwi-ao---- 1.00g
[fast_cmeta] test ewi-ao---- 8.00m
[lvol0_pmspare] test ewi------- 8.00m
Thank you.
Maybe I do not understand? Can you please explain this behavior.
For example:
I have the full cached partition, with full cache:
[***@localhost ~]# df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/test-data 12G 12G 0 100% /data
[***@localhost ~]# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data test Cwi-aoC--- 12.00g [fast] [data_corig] 99.72 2.93 0.00
[data_corig] test owi-aoC--- 12.00g
[fast] test Cwi---C--- 1.00g 99.72 2.93 0.00
[fast_cdata] test Cwi-ao---- 1.00g
[fast_cmeta] test ewi-ao---- 8.00m
[lvol0_pmspare] test ewi------- 8.00m
I clear the partition and do fstrim:
[***@localhost ~]# rm -rf /data/*
[***@localhost ~]# fstrim -v /data
[***@localhost ~]# df -h /data
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/test-data 12G 41M 12G 1% /data
But the cache remained full:
[***@localhost ~]# lvs -a
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data test Cwi-aoC--- 12.00g [fast] [data_corig] 99.72 2.93 0.00
[data_corig] test owi-aoC--- 12.00g
[fast] test Cwi---C--- 1.00g 99.72 2.93 0.00
[fast_cdata] test Cwi-ao---- 1.00g
[fast_cmeta] test ewi-ao---- 8.00m
[lvol0_pmspare] test ewi------- 8.00m
Thank you.