~louis/ubuntu/vivid/uvtool/uvtool-lp1317266-doc-backing-img-file

« back to all changes in this revision

Viewing changes to README

  • Committer: Package Import Robot
  • Author(s): Robie Basak
  • Date: 2013-09-20 17:33:54 UTC
  • Revision ID: package-import@ubuntu.com-20130920173354-1eeqk3ary5bdafst
Tags: upstream-0~bzr35
ImportĀ upstreamĀ versionĀ 0~bzr35

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Images are stored as follows:
 
2
 
 
3
/var/lib/uvtool/libvirt/images is a used as a libvirt volume pool called
 
4
"uvtool". It is accessed through the libvirt API only.
 
5
 
 
6
/var/lib/uvtool/libvirt/metadata contains files whose names correspond to
 
7
the names defined in the "uvtool" libvirt volume pool.
 
8
 
 
9
Metadata file semantics are as follows:
 
10
 
 
11
If a metadata file does not exist, and the corresponding volume does not exist,
 
12
then nothing is known about the volume (that doesn't exist).
 
13
 
 
14
If a metadata file exists and the corresponding volume also exists, then the
 
15
volume is known about and can be used. The metadata file is a JSON-formatted
 
16
file containing the simplestreams key/value pairs associated with the image.
 
17
 
 
18
If a metadata file does not exist, but the corresponding volume does exist,
 
19
then the image is gone from the uvtool-simplestreams-libvirt view and cannot be
 
20
used to create an instance. However, the image may still be in use by existing
 
21
instances. It will be cleaned up on the next "uvtool-simplestreams-libvirt
 
22
sync" command but only if it the volume is no longer in use. This is a common
 
23
case: official "release" images go out of date, since updated images with new
 
24
updated packages and kernels are continually produced. So the sync logic will
 
25
drop images for use with new instances, but old instances will continue to use
 
26
them as their copy-on-write backing volumes.
 
27
 
 
28
If a metadata file exists, but the corresponding volume does not exist, then
 
29
this is an error. "uvtool-simplestreams-libvirt sync" will erase the spurious
 
30
metadata file on its next run.
 
31
 
 
32
In all cases, a volume is treated as "in use" if an instance exists that uses
 
33
it: either directly or through another volume as a backing store. These cases
 
34
correspond to specific XPath searches in the libvirt domain and volume XML
 
35
object definitions. Any other cases that should be covered need to be
 
36
specifically added to the volume "in use" detection logic.