<HTML>
<HEAD>
<TITLE>Re: [libvirt] Libvirt storage api and lvm .cache issue</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Lvremove does not properly remove it from the .cache.  Perhaps that is the bug.  I’ll investigate more ( I’m using lvm2-2.02.46-8.el5).<BR>
<BR>
-bash-3.2$ sudo cat /etc/lvm/cache/.cache  | grep tom<BR>
                "/dev/sys/tomtest2",<BR>
                "/dev/mapper/sys-tomtest2",<BR>
-bash-3.2$ sudo lvremove /dev/sys/tomtest2  <BR>
Do you really want to remove active logical volume tomtest2? [y/n]: y<BR>
  Logical volume "tomtest2" successfully removed<BR>
-bash-3.2$ sudo cat /etc/lvm/cache/.cache  | grep tom<BR>
                "/dev/sys/tomtest2",<BR>
                "/dev/mapper/sys-tomtest2",<BR>
<BR>
Thanks<BR>
Tom<BR>
<BR>
<BR>
On 8/9/10 4:52 PM, "Daniel P. Berrange" <<a href="berrange@redhat.com">berrange@redhat.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>On Mon, Aug 09, 2010 at 02:25:21PM -0700, Thomas Graves wrote:<BR>
> Hello all,<BR>
><BR>
> I am using the libvirt storage api with LVM storage on rhel5 with xen and I<BR>
> noticed that when using the api to create/delete lv's they get added to<BR>
> /etc/lvm/cache/.cache  but old deleted ones never get removed from the<BR>
> .cache.  This causes dmeventd to keep trying to access them but can't which<BR>
> fills up the logs in /var/log.<BR>
><BR>
> Has anyone seen this or have a fix for it?  I guess I could force a vgscan<BR>
> or something to clean it up just seems like I shouldn't need to.<BR>
<BR>
Not sure why this would happen. When deleting LV's in libvirt, we simply<BR>
call our to lvremove, which I assume would clear up .cache entries.<BR>
<BR>
Daniel<BR>
--<BR>
|: Red Hat, Engineering, London    -o-   <a href="http://people.redhat.com/berrange/">http://people.redhat.com/berrange/</a> :|<BR>
|: <a href="http://libvirt.org">http://libvirt.org</a> -o- <a href="http://virt-manager.org">http://virt-manager.org</a> -o- <a href="http://deltacloud.org">http://deltacloud.org</a> :|<BR>
|: <a href="http://autobuild.org">http://autobuild.org</a>        -o-         <a href="http://search.cpan.org/~danberr/">http://search.cpan.org/~danberr/</a> :|<BR>
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>