<div dir="ltr">Hi Daniel,<div><br></div><div>my Virtual machines are running, so how I can stop the volumes?</div><div><br></div><div>Br.</div><div><br></div><div>Umar</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Dec 19, 2013 at 9:21 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Dec 19, 2013 at 01:54:19AM +0500, Umar Draz wrote:<br>
> Hi I am trying to stop the storage pool through php-libvirt api which is a<br>
> LVM volume group.<br>
><br>
> when I tried to stop it I got error<br>
><br>
> error: internal error Child process (/sbin/vgchange -aln mylvmgrp)<br>
> unexpected exit status 5:   Can't deactivate volume group "mylvmgrp" with 4<br>
> open logical volume(s)<br>
><br>
> Then I tried throggh virsh command but the result remain same.<br>
><br>
</div>> *root@kvm02:~# virsh pool-destroy vms*<br>
<div class="im">> error: Failed to destroy pool vms<br>
> error: internal error Child process (/sbin/vgchange -aln mylvmgrp)<br>
> unexpected exit status 5:   Can't deactivate volume group "mylvmgrp" with 4<br>
> open logical volume(s)<br>
<br>
</div>This indicates some process(s) are still using the logical volumes<br>
so it is preventingn you breaking those apps. This is expected<br>
behaviour.<br>
<div class="im"><br>
><br>
> The same error also occured if I use direct vgchange -aln on my kvm host,<br>
> but then I tried<br>
><br>
><br>
</div>> *vgchange -aly mylvmgrp*<br>
><br>
> this time its worked<br>
<br>
That is a totally different operation -aly *activates* volumes which<br>
is the exact opposite of what 'pool-destroy' needs, which is to<br>
de-activate the volumes<br>
<div class="im"><br>
><br>
>   14 logical volume(s) in volume group "mylvmgrp" now active<br>
><br>
> 1) Now would you please help me? is this libvirt issue? or LVM?<br>
> 2) Is this possible virsh pool-destroy pool also run the vgchange -aly<br>
> instead of -aln<br>
<br>
</div>AFAICT, there's no bug here. You just need to stop using the volumes<br>
before stopping the pool.<br>
<span class="HOEnZb"><font color="#888888"><br>
Daniel<br>
--<br>
|: <a href="http://berrange.com" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org" target="_blank">http://virt-manager.org</a> :|<br>
|: <a href="http://autobuild.org" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Umar Draz<br>Network Architect
</div>