[libvirt] [PATCH 2/2] Ignore backing file errors in FS storage pool (v3)

Philipp Hahn hahn at univention.de
Thu Feb 24 07:26:47 UTC 2011


Currently a single storage volume with a broken backing file will disable the
whole storage pool. This can happen when the backing file is on some
unavailable network storage or if the backing volume is deleted, while the
storage volumes using it are not.
Since the storage pool then can not be re-activated, re-creating the missing 
or
deleting the now useless volumes using libvirt only is impossible.

To "fix" this case, all errors detected during storage pool activation are now
(silently) ignored. Errors are still logged by the called functions, which 
have
more knowledge on the detailed error condition.

To reproduce:
  dir=$(mktemp -d)
  virsh pool-create-as tmp dir '' '' '' '' "$dir"
  virsh vol-create-as --format qcow2 tmp back 1G
  virsh vol-create-as --format qcow2 --backing-vol-format qcow2 --backing-vol 
back tmp cow 1G
  virsh vol-delete --pool tmp back
  virsh pool-refresh tmp
After the last step, the pool will be gone (because it was not persistent). As
long as the now broken image stays in the directory, you will not be able to
re-create or re-start the pool.

Signed-off-by: Philipp Hahn <hahn at univention.de>
---
 src/storage/storage_backend_fs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Ignore-backing-file-errors-in-FS-storage-pool.patch
Type: text/x-patch
Size: 1086 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110224/0bf1bb0d/attachment-0001.bin>


More information about the libvir-list mailing list