Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

LVM2 cache problem...

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
rsi
Posts: 21
Joined: 2014-10-20 00:52

LVM2 cache problem...

#1 Post by rsi »

Hello,

I've some cached lvm2 volumes (used for kvm/qemu). After a problem with my main system hdd, I've problems with some of this cached lvm volumes.

Hint: lvshow is just an alias made by me.

Code: Select all

alias lvshow='lvs -a -o +raid_sync_action,raid_mismatch_count,devices'
Some volumes are not active, so I tried activate them, like this...

Code: Select all

root@vmm:~# lvshow | grep win7
  win7                      VM_SysDevs Cwi---C--- 50.00g [win7_cache]        [win7_corig]                                                                      win7_corig(0)
  [win7_cache]              VM_SysDevs Cwi---C---  8.00g                                                                                                       win7_cache_cdata(0)
  [win7_cache_cdata]        VM_SysDevs Cwi-------  8.00g                                                                                                       /dev/sdj2(6144)
  [win7_cache_cmeta]        VM_SysDevs ewi------- 12.00m                                                                                                       /dev/md127(16384)
  [win7_corig]              VM_SysDevs owi---C--- 50.00g                                                                                                       /dev/md127(34816)

root@vmm:~# lvchange -ay VM_SysDevs/win7
  Check of pool VM_SysDevs/win7_cache failed (status:1). Manual repair required!
Can't activate it!

So, what means "manual repair"?
I tried this...

Code: Select all

root@vmm:~# cache_check VM_SysDevs/win7
VM_SysDevs/win7: No such file or directory
root@vmm:~# cache_check /dev/VM_SysDevs/win7
/dev/VM_SysDevs/win7: No such file or directory
Yes, right... it is not activated.

Next step...

Code: Select all

root@vmm:~# lvconvert --repair -v VM_SysDevs/win7
  WARNING: Disabling lvmetad cache for repair command.
  WARNING: Not using lvmetad because of repair.
    activation/volume_list configuration setting not defined: Checking only host tags for VM_SysDevs/lvol8_pmspare.
    Creating VM_SysDevs-lvol8_pmspare
    Loading VM_SysDevs-lvol8_pmspare table (253:1)
    Resuming VM_SysDevs-lvol8_pmspare (253:1)
    activation/volume_list configuration setting not defined: Checking only host tags for VM_SysDevs/win7_cache_cmeta.
    Creating VM_SysDevs-win7_cache_cmeta
    Loading VM_SysDevs-win7_cache_cmeta table (253:2)
    Resuming VM_SysDevs-win7_cache_cmeta (253:2)
    Executing: /usr/sbin/cache_repair  -i /dev/mapper/VM_SysDevs-win7_cache_cmeta -o /dev/mapper/VM_SysDevs-lvol8_pmspare
    Removing VM_SysDevs-win7_cache_cmeta (253:2)
    Removing VM_SysDevs-lvol8_pmspare (253:1)
    Preparing pool metadata spare volume for Volume group VM_SysDevs.
    Archiving volume group "VM_SysDevs" metadata (seqno 952).
    Creating logical volume lvol9
    Creating volume group backup "/etc/lvm/backup/VM_SysDevs" (seqno 953).
    Activating logical volume VM_SysDevs/lvol9 locally.
    activation/volume_list configuration setting not defined: Checking only host tags for VM_SysDevs/lvol9.
    Creating VM_SysDevs-lvol9
    Loading VM_SysDevs-lvol9 table (253:1)
    Resuming VM_SysDevs-lvol9 (253:1)
    Initializing 4.00 KiB of logical volume "VM_SysDevs/lvol9" with value 0.
    Temporary logical volume "lvol9" created.
    Removing VM_SysDevs-lvol9 (253:1)
    Renaming lvol9 as pool metadata spare volume lvol9_pmspare.
  WARNING: If everything works, remove VM_SysDevs/win7_meta0 volume.
  WARNING: Use pvmove command to move VM_SysDevs/win7_cache_cmeta on the best fitting PV.
But this is not helping.

Try to disable / remove cache.

Code: Select all

root@vmm:~# lvconvert -v --force --uncache VM_SysDevs/win7
  WARNING: Not using lvmetad because a repair command was run.
    Archiving volume group "VM_SysDevs" metadata (seqno 954).
    activation/volume_list configuration setting not defined: Checking only host tags for VM_SysDevs/win7.
    Creating VM_SysDevs-win7_cache_cdata
    Loading VM_SysDevs-win7_cache_cdata table (253:1)
    Resuming VM_SysDevs-win7_cache_cdata (253:1)
    Creating VM_SysDevs-win7_cache_cmeta
    Loading VM_SysDevs-win7_cache_cmeta table (253:2)
    Resuming VM_SysDevs-win7_cache_cmeta (253:2)
    Creating VM_SysDevs-win7_corig
    Loading VM_SysDevs-win7_corig table (253:15)
    Resuming VM_SysDevs-win7_corig (253:15)
    Executing: /usr/sbin/cache_check -q /dev/mapper/VM_SysDevs-win7_cache_cmeta
    /usr/sbin/cache_check failed: 1
  Check of pool VM_SysDevs/win7_cache failed (status:1). Manual repair required!
    Removing VM_SysDevs-win7_corig (253:15)
    Removing VM_SysDevs-win7_cache_cmeta (253:2)
    Removing VM_SysDevs-win7_cache_cdata (253:1)
  Failed to active cache locally VM_SysDevs/win7.
Not working...
What can I do???

Thanks for hints and help!

Edit:
After some try-and-error, I tried to make a mirror. Not working, because... cache problem! Then I tried to make a snapshot. Not working, because of... right! cache problem!
Now I'm pissed off to the cache implementation!

Post Reply