Revision ac70550e doc/design-shared-storage.rst

b/doc/design-shared-storage.rst
266 266
them, similarly to the way  `gnt-os diagose` and `gnt-os info` handle OS
267 267
definitions.
268 268

  
269
ExtStorage Interface support for userspace access
270
=================================================
271

  
272
Overview
273
--------
274

  
275
The ExtStorage Interface gets extended to cater for ExtStorage providers
276
that support userspace access. This will allow the instances to access
277
their external storage devices directly without going through a block
278
device, avoiding expensive context switches with kernel space and the
279
potential for deadlocks in low memory scenarios. The implementation
280
should be backwards compatible and allow existing ExtStorage
281
providers to work as is.
282

  
283
Implementation
284
--------------
285

  
286
Since the implementation should be backwards compatible we are not going
287
to add a new script in the set of scripts an ExtStorage provider should
288
ship with. Instead, the 'attach' script, which is currently responsible
289
to map the block device and return a valid device path, should also be
290
responsible for providing the URIs that will be used by each
291
hypervisor. Even though Ganeti currently allows userspace access only
292
for the KVM hypervisor, we want the implementation to enable the
293
extstorage providers to support more than one hypervisors for future
294
compliance.
295

  
296
More specifically, the 'attach' script will be allowed to return more
297
than one line. The first line will contain as always the block device
298
path. Each one of the extra lines will contain a URI to be used for the
299
userspace access by a specific hypervisor. Each URI should be prefixed
300
with the hypervisor it corresponds to (e.g. kvm:<uri>). The prefix will
301
be case insensitive. If the 'attach' script doesn't return any extra
302
lines, we assume that the ExtStorage provider doesn't support userspace
303
access (this way we maintain backward compatibility with the existing
304
'attach' scripts).
305

  
306
The 'GetUserspaceAccessUri' method of the 'ExtStorageDevice' class will
307
parse the output of the 'attach' script and if the provider supports
308
userspace access for the requested hypervisor, it will use the
309
corresponding URI instead of the block device itself.
310

  
269 311
Long-term shared storage goals
270 312
==============================
271 313

  

Also available in: Unified diff