linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Why doesn't the lvmcache support the discard (trim) command?
@ 2018-10-18 22:56 Ilia Zykov
  2018-10-19  9:12 ` Zdenek Kabelac
  0 siblings, 1 reply; 12+ messages in thread
From: Ilia Zykov @ 2018-10-18 22:56 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]

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:

[root@localhost ~]# df -h /data
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/test-data   12G   12G     0 100% /data
[root@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:

[root@localhost ~]# rm -rf /data/*
[root@localhost ~]# fstrim -v /data
[root@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:

[root@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.


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3980 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-10-22 10:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 22:56 [linux-lvm] Why doesn't the lvmcache support the discard (trim) command? Ilia Zykov
2018-10-19  9:12 ` Zdenek Kabelac
2018-10-19  9:42   ` Gionatan Danti
2018-10-19  9:49     ` Zdenek Kabelac
2018-10-19  9:55   ` Ilia Zykov
2018-10-19 10:58     ` Zdenek Kabelac
2018-10-19 12:45       ` Gionatan Danti
2018-10-19 13:08         ` Zdenek Kabelac
2018-10-19 13:16           ` Ilia Zykov
2018-10-19 17:00           ` Ilia Zykov
2018-10-22 10:54             ` Zdenek Kabelac
2018-10-19 20:54           ` Gionatan Danti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).