[libvirt] how to delete storage-pool entirely

it seems that if pools has the same path even with different uuid ,they will be recognize as one pool. if i have defined a pool with a special path, next time to define a new one(same path , different uuid) will fail. then i delete(rm -f ) pool.xml file, define the pool again , it fail too. so if there is cache for all pools been defined until next start libvirtd? my questions: 1. how to delete a pool entilely , include pool-xml file and possible cache (not to restart libvirtd).? 2.throught calling libvirt API , how to find the pool with a special path,no need to define it again? thanks

On 10/25/2012 01:51 AM, yue wrote: When asking unrelated questions, it is best to start a new thread instead of sending your mail in reply to the wrong thread.
it seems that if pools has the same path even with different uuid ,they will be recognize as one pool.
You may have found a bug - in general, different UUID must mean different pools, but the same path should not be possible in different pools.
if i have defined a pool with a special path, next time to define a new one(same path , different uuid) will fail. then i delete(rm -f ) pool.xml file, define the pool again , it fail too. so if there is cache for all pools been defined until next start libvirtd?
my questions:
1. how to delete a pool entilely , include pool-xml file and possible cache (not to restart libvirtd).?
virsh pool-undefine
2.throught calling libvirt API , how to find the pool with a special path,no need to define it again?
Not quite sure I understood the question, but 'virsh pool-list' and 'virsh pool-refresh' might be helpful. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

hi, 1.for netfs, it check not only UUID but alse host-ip and dir to find a suplicated pool. it needs a discuss. in my case i need add several pool which share a nfs-export. 2.if it is possible to supply a API like storagePoolLookupByHostAndDirString for netfs? so easy to locate a pool with special host and dir? thanks. At 2012-10-25 21:21:36,"Eric Blake" <eblake@redhat.com> wrote:
On 10/25/2012 01:51 AM, yue wrote:
When asking unrelated questions, it is best to start a new thread instead of sending your mail in reply to the wrong thread.
it seems that if pools has the same path even with different uuid ,they will be recognize as one pool.
You may have found a bug - in general, different UUID must mean different pools, but the same path should not be possible in different pools.
if i have defined a pool with a special path, next time to define a new one(same path , different uuid) will fail. then i delete(rm -f ) pool.xml file, define the pool again , it fail too. so if there is cache for all pools been defined until next start libvirtd?
my questions:
1. how to delete a pool entilely , include pool-xml file and possible cache (not to restart libvirtd).?
virsh pool-undefine
2.throught calling libvirt API , how to find the pool with a special path,no need to define it again?
Not quite sure I understood the question, but 'virsh pool-list' and 'virsh pool-refresh' might be helpful.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 10/25/2012 09:22 AM, libvirt@163.com wrote: [please don't top-post on technical lists]
hi, 1.for netfs, it check not only UUID but alse host-ip and dir to find a suplicated pool. it needs a discuss. in my case i need add several pool which share a nfs-export.
Why do you need multiple pools visiting the same export? I haven't played with netfs pools much; perhaps demonstrating some actual pool XML that you are trying to represent will help us understand what you are trying to do.
2.if it is possible to supply a API like storagePoolLookupByHostAndDirString for netfs? so easy to locate a pool with special host and dir?
If virStoragePoolLookupByName doesn't do what you want, then yes it might be worth adding a new API that does the particular lookup that you want. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

1.in my case , i attach a ISO to several VM, each action of attachment will define a pool from XML, so different UUID but same host and dir. otherwhile i have to record how many times a ISO is attached. hard to know how many ISO and how many VM. maybe you can add a configuration option weather this is allowed . 2.it seems that pool-undefine do not delete local-directory corresponding to a pool, this will leave lots of unused dir. thanks At 2012-10-26 02:08:53,"Eric Blake" <eblake@redhat.com> wrote:
On 10/25/2012 09:22 AM, libvirt@163.com wrote:
[please don't top-post on technical lists]
hi, 1.for netfs, it check not only UUID but alse host-ip and dir to find a suplicated pool. it needs a discuss. in my case i need add several pool which share a nfs-export.
Why do you need multiple pools visiting the same export? I haven't played with netfs pools much; perhaps demonstrating some actual pool XML that you are trying to represent will help us understand what you are trying to do.
2.if it is possible to supply a API like storagePoolLookupByHostAndDirString for netfs? so easy to locate a pool with special host and dir?
If virStoragePoolLookupByName doesn't do what you want, then yes it might be worth adding a new API that does the particular lookup that you want.
-- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (3)
-
Eric Blake
-
libvirt@163.com
-
yue