Revision 855f9bad

b/doc/design-shared-storage.rst
22 22

  
23 23
Background
24 24
==========
25

  
25 26
DRBD is currently the only shared storage backend supported by Ganeti.
26 27
DRBD offers the advantages of high availability while running on
27 28
commodity hardware at the cost of high network I/O for block-level
......
45 46

  
46 47
Use cases
47 48
=========
49

  
48 50
We consider the following use cases:
49 51

  
50 52
- A virtualization cluster with FibreChannel shared storage, mapping at
......
63 65
  storage.
64 66
- Introduction of a shared file storage disk template for use with networked
65 67
  filesystems.
66
- Introduction of shared block device disk template with device
68
- Introduction of a shared block device disk template with device
67 69
  adoption.
68
- Introduction of an External Storage Interface.
70
- Introduction of the External Storage Interface.
69 71

  
70 72
Additionally, mid- to long-term goals include:
71 73

  
......
156 158
- The device will be available with the same path under all nodes in the
157 159
  node group.
158 160

  
159
Introduction of an External Storage Interface
161
Introduction of the External Storage Interface
160 162
==============================================
163

  
161 164
Overview
162 165
--------
163 166

  
......
180 183
- Grow a disk
181 184
- Attach a disk to a given node
182 185
- Detach a disk from a given node
186
- SetInfo to a disk (add metadata)
183 187
- Verify its supported parameters
184 188

  
185 189
The proposed ExtStorage interface borrows heavily from the OS
......
191 195
- ``grow``
192 196
- ``attach``
193 197
- ``detach``
198
- ``setinfo``
194 199
- ``verify``
195 200

  
196 201
All scripts will be called with no arguments and get their input via
......
208 213
``EXTP_name``
209 214
  ExtStorage parameter, where `name` is the parameter in
210 215
  upper-case (same as OS interface's ``OSP_*`` parameters).
216
``VOL_METADATA``
217
  A string containing metadata to be set for the volume.
218
  This is exported only to the ``setinfo`` script.
211 219

  
212 220
All scripts except `attach` should return 0 on success and non-zero on
213 221
error, accompanied by an appropriate error message on stderr. The
......
221 229
To support the ExtStorage interface, we will introduce a new disk
222 230
template called `ext`. This template will implement the existing Ganeti
223 231
disk interface in `lib/bdev.py` (create, remove, attach, assemble,
224
shutdown, grow), and will simultaneously pass control to the external
225
scripts to actually handle the above actions. The `ext` disk template
226
will act as a translation layer between the current Ganeti disk
232
shutdown, grow, setinfo), and will simultaneously pass control to the
233
external scripts to actually handle the above actions. The `ext` disk
234
template will act as a translation layer between the current Ganeti disk
227 235
interface and the ExtStorage providers.
228 236

  
229 237
We will also introduce a new IDISK_PARAM called `IDISK_PROVIDER =
b/man/ganeti-extstorage-interface.rst
21 21
REFERENCE
22 22
---------
23 23

  
24
There are seven required files: *create*, *attach*, *detach*, *remove*,
25
*grow*, *verify* (executables) and *parameters.list* (text file).
24
There are eight required files: *create*, *attach*, *detach*, *remove*,
25
*grow*, *setinfo*, *verify* (executables) and *parameters.list*
26
(text file).
26 27

  
27 28
Common environment
28 29
~~~~~~~~~~~~~~~~~~
......
57 58
    variable, prefixed with ``EXTP_``, and upper-cased. For example, a
58 59
    ``fromsnap`` parameter will be exported as ``EXTP_FROMSNAP``.
59 60

  
61
VOL_METADATA
62
    Available only to the **setinfo** script. A string containing
63
    metadata to be associated with the volume. Currently, Ganeti sets
64
    this value to ``originstname+X`` where ``X`` is the instance's name.
65

  
60 66
EXECUTABLE SCRIPTS
61 67
------------------
62 68

  
......
159 165

  
160 166
The script returns ``0`` on success.
161 167

  
168
setinfo
169
~~~~~~~
170

  
171
This script is used to add metadata to an existing volume. It is helpful
172
when we need to keep an external, Ganeti-independent mapping between
173
instances and volumes; primarily for recovery reasons. This is provider
174
specific and the author of the provider chooses whether/how to implement
175
this. You can just exit with ``0``, if you do not want to implement this
176
feature, without harming the overall functionality of the provider.
177

  
178
The ``VOL_METADATA`` variable contains the metadata of the volume.
179

  
180
Currently, Ganeti sets this value to ``originstname+X`` where ``X`` is
181
the instance's name.
182

  
183
The script returns ``0`` on success.
184

  
162 185
verify
163 186
~~~~~~
164 187

  
......
196 219
Backwards compatibility
197 220
~~~~~~~~~~~~~~~~~~~~~~~
198 221

  
199
The ExtStorage Interface was introduced in Ganeti 2.6.
200
Ganeti 2.6 and up is compatible with the ExtStorage Interface.
222
The ExtStorage Interface was introduced in Ganeti 2.7.
223
Ganeti 2.7 and up is compatible with the ExtStorage Interface.
201 224

  
202 225
Common behaviour
203 226
~~~~~~~~~~~~~~~~

Also available in: Unified diff