]> git.proxmox.com Git - ceph.git/blame - ceph/doc/dev/rbd-export.rst
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / doc / dev / rbd-export.rst
CommitLineData
7c673cae
FG
1RBD Export & Import
2===================
3
4This is a file format of an RBD image or snapshot. It's a sparse format
5for the full image. There are three recording sections in the file.
6
7(1) Header.
8(2) Metadata.
9(3) Diffs.
10
11Header
12~~~~~~
13
14"rbd image v2\\n"
15
16Metadata records
17~~~~~~~~~~~~~~~~
18
19Every record has a one byte "tag" that identifies the record type,
20followed by length of data, and then some other data.
21
22Metadata records come in the first part of the image. Order is not
23important, as long as all the metadata records come before the data
24records.
25
26In v2, we have the following metadata in each section:
27(1 Bytes) tag.
28(8 Bytes) length.
29(n Bytes) data.
30
31In this way, we can skip the unrecognized tag.
32
33Image order
34-----------
35
36- u8: 'O'
37- le64: length of appending data (8)
38- le64: image order
39
40Image format
41------------
42
43- u8: 'F'
44- le64: length of appending data (8)
45- le64: image format
46
47Image Features
48--------------
49
50- u8: 'T'
51- le64: length of appending data (8)
52- le64: image features
53
54Image Stripe unit
55-----------------
56
57- u8: 'U'
58- le64: length of appending data (8)
59- le64: image striping unit
60
61Image Stripe count
62------------------
63
64- u8: 'C'
65- le64: length of appending data (8)
66- le64: image striping count
67
68Final Record
69~~~~~~~~~~~~
70
71End
72---
73
74- u8: 'E'
75
76
77Diffs records
78~~~~~~~~~~~~~~~~~
79Record the all snapshots and the HEAD in this section.
80
81- le64: number of diffs
82- Diffs ...
83
84Detail please refer to rbd-diff.rst