Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lvm2 writeback cache flush loops forever #22

Closed
sulakshm opened this issue Jul 30, 2019 · 3 comments
Closed

lvm2 writeback cache flush loops forever #22

sulakshm opened this issue Jul 30, 2019 · 3 comments

Comments

@sulakshm
Copy link

sulakshm commented Jul 30, 2019

lvmcache in writeback mode does not ever complete flush sometimes.
Can I please get some clarity on what exactly is the rootcause and when this was resolved?

Even putting the lvmcache into cleaner policy did not make any difference.
There is no kernel crash/traceback seen.

root@pdc4-sm35:~# lvs -o cache_dirty_blocks,cache_policy pwx0/pool
  CacheDirtyBlocks Cache Policy
               367 cleaner
root@pdc4-sm35:~#
root@pdc4-sm35:~# lvconvert --splitcache pwx0/pool
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
^C
root@pdc4-sm35:~#
root@pdc4-sm35:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http:https://www.ubuntu.com/"
SUPPORT_URL="http:https://help.ubuntu.com/"
BUG_REPORT_URL="http:https://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
root@pdc4-sm35:~# lvm version
  LVM version:     2.02.133(2) (2015-10-30)
  Library version: 1.02.110 (2015-10-30)
  Driver version:  4.34.0
root@pdc4-sm35:~# uname -r
4.4.0-21-generic
root@pdc4-sm35:~#
@sulakshm
Copy link
Author

sulakshm commented Jul 30, 2019

A reboot of the node, forced the dirty blocks to not show up.

root@pdc4-sm35:~# lvs -o cache_dirty_blocks,cache_policy pwx0
  CacheDirtyBlocks Cache Policy
                   cleaner
root@pdc4-sm35:~#

But if the whole vg is tried to be removed, then it results in strange errors as below now....

root@pdc4-sm35:~# vgremove -f pwx0
  /usr/sbin/cache_check: execvp failed: No such file or directory
  Check of pool pwx0/cache failed (status:2). Manual repair required!
  Failed to active cache locally pwx0/pool.
  Failed to uncache pwx0/pool.
root@pdc4-sm35:~#
root@pdc4-sm35:~# pvscan --cache
root@pdc4-sm35:~# vgremove -f pwx0
  /usr/sbin/cache_check: execvp failed: No such file or directory
  Check of pool pwx0/cache failed (status:2). Manual repair required!
  Failed to active cache locally pwx0/pool.
  Failed to uncache pwx0/pool.
root@pdc4-sm35:~# vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  pwx0   2   1   0 wz--n- 30.85t    0
root@pdc4-sm35:~# lvs
  LV   VG   Attr       LSize  Pool    Origin       Data%  Meta%  Move Log Cpy%Sync Convert
  pool pwx0 Cwi---C--- 29.11t [cache] [pool_corig]
root@pdc4-sm35:~#

@sulakshm
Copy link
Author

I installed now the thin-provisioning-tools package and cache_check is now made available.
The dirty blocks for some reason did not show up earlier, now comes back again. The count suggests the IO is stuck.

root@pdc4-sm35:~# apt-file search cache_check
thin-provisioning-tools: /usr/sbin/cache_check
thin-provisioning-tools: /usr/share/man/man8/cache_check.8.gz
root@pdc4-sm35:~# apt-get install -y thin-provisioning-tools
Reading package lists... Done
...
Preparing to unpack .../thin-provisioning-tools_0.5.6-1ubuntu1_amd64.deb ...
Unpacking thin-provisioning-tools (0.5.6-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up thin-provisioning-tools (0.5.6-1ubuntu1) ...
root@pdc4-sm35:~#
root@pdc4-sm35:~#
root@pdc4-sm35:~#
root@pdc4-sm35:~# lvremove -f pwx0/pool
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
  367 blocks must still be flushed.
^C
root@pdc4-sm35:~#

@csonto
Copy link
Contributor

csonto commented Aug 5, 2019 via email

@zkabelac zkabelac closed this as completed Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants