Debian Codegraph @

UG9/en/openstack-linstor.adoc

raw
1 [[ch-openstack-linstor]]
2 == LINSTOR Volumes in Openstack
3
4 indexterm:[Openstack]indexterm:[Cinder]
5 This chapter describes using LINSTOR to provision persistent, replicated, and
6 high-performance block storage for Openstack.
7
8
9 [[s-openstack-linstor-overview]]
10 === Openstack Overview
11
12 Openstack consists of a wide range of individual services; The service responsible
13 for provisioning and managing block storage is called
14 https://docs.openstack.org/cinder/latest/[Cinder]. Other openstack services such
15 as the compute instance service https://docs.openstack.org/nova/latest[Nova] can
16 request volumes from Cinder. Cinder will then make a volume accessible to the
17 requesting service.
18
19 LINSTOR can integrate with Cinder using a *volume driver*. The volume driver
20 translates calls to the Cinder API to LINSTOR commands. For example: requesting a
21 volume from Cinder will create new resources in LINSTOR, Cinder Volume snapshots
22 translate to snapshots in LINSTOR and so on.
23
24 [[s-openstack-linstor-install]]
25 === LINSTOR for Openstack Installation
26
27 An initial installation and configuration of DRBD and LINSTOR must be completed
28 prior to using the OpenStack driver.
29
30 * A detailed installation guide can be found <<s-installation,here>>.
31 * <<s-linstor-init-cluster,Initialize>> your cluster
32 * Learn how to use the <<s-using_the_linstor_client,LINSTOR client>>
33 * <<s-adding_nodes_to_your_cluster,Add all storage nodes>> to the LINSTOR cluster
34
35 At this point you should be able to list your storage cluster
36 nodes using the LINSTOR client:
37
38 [source]
39 ----
40 $ linstor node info
41 ╭────────────────────────────────────────────────────────────────────────────╮
42 ┊ Node ┊ NodeType ┊ Addresses ┊ State ┊
43 ╞════════════════════════════════════════════════════════════════════════════╡
44 ┊ cinder-01.openstack.test ┊ COMBINED ┊ 10.43.224.21:3366 (PLAIN) ┊ Online ┊
45 ┊ cinder-02.openstack.test ┊ COMBINED ┊ 10.43.224.22:3366 (PLAIN) ┊ Online ┊
46 ┊ storage-01.openstack.test ┊ SATELLITE ┊ 10.43.224.11:3366 (PLAIN) ┊ Online ┊
47 ┊ storage-02.openstack.test ┊ SATELLITE ┊ 10.43.224.12:3366 (PLAIN) ┊ Online ┊
48 ┊ storage-03.openstack.test ┊ SATELLITE ┊ 10.43.224.13:3366 (PLAIN) ┊ Online ┊
49 ╰────────────────────────────────────────────────────────────────────────────╯
50 ----
51
52 You should <<s-storage_pools,configure one or more storage pools>> per node. This guide assumes the
53 storage pool is named `cinderpool`. LINSTOR should list the storage pool for each node, including the diskless storage
54 pool created by default.
55
56 [source]
57 ----
58 $ linstor storage-pool list
59 ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
60 ┊ StoragePool ┊ Node ┊ Driver ┊ PoolName ┊ FreeCapacity ┊ TotalCapacity ┊ CanSnapshots ┊ State ┊
61 ╞═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
62 ┊ DfltDisklessStorPool ┊ cinder-01.openstack.test ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
63 ┊ DfltDisklessStorPool ┊ cinder-02.openstack.test ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
64 ┊ DfltDisklessStorPool ┊ storage-01.openstack.test ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
65 ┊ DfltDisklessStorPool ┊ storage-02.openstack.test ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
66 ┊ DfltDisklessStorPool ┊ storage-03.openstack.test ┊ DISKLESS ┊ ┊ ┊ ┊ False ┊ Ok ┊
67 ┊ cinderpool ┊ storage-01.openstack.test ┊ LVM_THIN ┊ ssds/cinderpool ┊ 100 GiB ┊ 100 GiB ┊ True ┊ Ok ┊
68 ┊ cinderpool ┊ storage-02.openstack.test ┊ LVM_THIN ┊ ssds/cinderpool ┊ 100 GiB ┊ 100 GiB ┊ True ┊ Ok ┊
69 ┊ cinderpool ┊ storage-03.openstack.test ┊ LVM_THIN ┊ ssds/cinderpool ┊ 100 GiB ┊ 100 GiB ┊ True ┊ Ok ┊
70 ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
71 ----
72
73 [[s-update_the_linstor_driver]]
74 ==== Upgrades of LINSTOR driver
75
76 If this is a fresh installation, skip this section and continue with <<s-install_the_linstor_driver>>.
77
78 ===== From 1.x to 2.x
79
80 Driver version 2 dropped some static configuration options in favour of managing these options at runtime via
81 <<s-openstack-volume-types,volume types>>.
82
83 [frame="topbot",options="header"]
84 |====
85 | Option in `cinder.conf` | Status | Replace with
86 | `linstor_autoplace_count` | removed | Use the `linstor:redundancy` property on the volume type. Using a value of 0 for full cluster replication is not supported, use the advanced options of <<s-autoplace-linstor, the LINSTOR autoplacer>>
87 | `linstor_controller_diskless` | removed | No replacement needed, the driver will create a diskless resource on the cinder host when required
88 | `linstor_default_blocksize` | removed | This setting had no effect.
89 | `linstor_default_storage_pool_name` | deprecated | This setting is deprecated for removal in a future version. Use the `linstor:storage_pool` property on the volume type instead.
90 | `linstor_default_uri` | deprecated | Replaced by the more aptly named `linstor_uris`.
91 | `linstor_default_volume_group_name` | removed | Creating nodes and storage pools was completely removed in Driver version 2. See <<s-openstack-linstor-install>>
92 | `linstor_volume_downsize_factor` | removed | This setting served no purpose, it was removed without replacement.
93 |====
94
95 [[s-install_the_linstor_driver]]
96 ==== Install the LINSTOR driver
97
98 Starting with OpenStack Stein, the LINSTOR driver is part of the Cinder project. While the driver can be used as is, it
99 might be missing features or fixes available in newer version. Due to OpenStacks update policy for stable versions, most
100 improvements to the driver will not get back-ported to older stable releases.
101
102 https://github.com/LINBIT/openstack-cinder[LINBIT maintains a fork] of the Cinder repository with all improvements to
103 the LINSTOR driver backported to the supported stable versions. Currently, these are:
104
105 [frame="topbot",options="header"]
106 |====
107 | OpenStack Release | Included Version | LINBIT Version | LINBIT Branch
108 | `wallaby` | 1.0.1 | 2.0.0 | https://github.com/LINBIT/openstack-cinder/tree/linstor%2Fstable%2Fwallaby[`linstor/stable/wallaby`]
109 | `victoria` | 1.0.1 | 2.0.0 | https://github.com/LINBIT/openstack-cinder/tree/linstor%2Fstable%2Fvictoria[`linstor/stable/victoria`]
110 | `ussuri` | 1.0.1 | 2.0.0 | https://github.com/LINBIT/openstack-cinder/tree/linstor%2Fstable%2Fussuri[`linstor/stable/ussuri`]
111 | `train` | 1.0.0 | 2.0.0 | https://github.com/LINBIT/openstack-cinder/tree/linstor%2Fstable%2Ftrain[`linstor/stable/train`]
112 | `stein` | 1.0.0 | 2.0.0 | https://github.com/LINBIT/openstack-cinder/tree/linstor%2Fstable%2Fstein[`linstor/stable/stein`]
113 | `rocky` | n/a | n/a | n/a
114 | `queens` | n/a | n/a | n/a
115 | `pike` | n/a | n/a | n/a
116 |====
117
118 The exact steps to enable the Linstor Driver depend on your OpenStack distribution. In general, the `python-linstor`
119 package needs to be installed on all hosts running the Cinder volume service. The next section will cover the
120 installation process for common OpenStack distributions.
121
122 ===== DevStack
123
124 https://docs.openstack.org/devstack/latest/[DevStack] is a great way to try out OpenStack in a lab environment.
125 To use the most recent driver use the following DevStack configuration:
126
127 .local.conf
128 ----
129 # This ensures the Linstor Driver has access to the 'python-linstor' package.
130 #
131 # This is needed even if using the included driver!
132 USE_VENV=True
133 ADDITIONAL_VENV_PACKAGES=python-linstor
134
135 # This is required to select the LINBIT version of the driver
136 CINDER_REPO=https://github.com/LINBIT/openstack-cinder.git
137 # Replace linstor/stable/victoria with the reference matching your Openstack release.
138 CINDER_BRANCH=linstor/stable/victoria
139 ----
140
141 ===== Kolla
142
143 https://docs.openstack.org/kolla/latest/[Kolla] packages OpenStack components in containers. They can then be deployed,
144 for example using https://docs.openstack.org/kolla-ansible/latest/[Kolla Ansible]
145 You can take advantage of the available customisation options for kolla containers to set up the Linstor driver.
146
147 To ensure that the required `python-linstor` package is installed, use the following override file:
148
149 .template-override.j2
150 [source]
151 ----
152 {% extends parent_template %}
153
154 # Cinder
155 {% set cinder_base_pip_packages_append = ['python-linstor'] %}
156 ----
157
158 To install the LINBIT version of the driver, update your `kolla-build.conf`
159
160 ./etc/kolla/kolla-build.conf
161 ----
162 [cinder-base]
163 type = git
164 location = https://github.com/LINBIT/openstack-cinder.git
165 # Replace linstor/stable/victoria with the reference matching your Openstack release.
166 reference = linstor/stable/victoria
167 ----
168
169 To rebuild the Cinder containers, run:
170 [source,shell]
171 ----
172 # A private registry used to store the kolla container images
173 REGISTRY=deployment-registry.example.com
174 # The image namespace in the registry
175 NAMESPACE=kolla
176 # The tag to apply to all images. Use the release name for compatibility with kolla-ansible
177 TAG=victoria
178 kolla-build -t source --template-override template-override.j2 cinder --registry $REGISTRY --namespace $NAMESPACE --tag $TAG
179 ----
180
181 ====== Kolla Ansible
182
183 When deploying OpenStack using Kolla Ansible, you need to make sure that:
184
185 * the custom Cinder images, created in the section above, are used
186 * deployment of Cinder services is enabled
187
188 ./etc/kolla/globals.yml
189 [source,yaml]
190 ----
191 # use "source" images
192 kolla_install_type: source
193 # use the same registry as for running kolla-build above
194 docker_registry: deployment-registry.example.com
195 # use the same namespace as for running kolla-build above
196 docker_namespace: kolla
197 # deploy cinder block storage service
198 enable_cinder: "yes"
199 # disable verification of cinder backends, kolla-ansible only supports a small subset of available backends for this
200 skip_cinder_backend_check: True
201 # add the LINSTOR backend to the enabled backends. For backend configuration see below
202 cinder_enabled_backends:
203 - name: linstor-drbd
204 ----
205
206 You can place the Linstor driver configuration in one of the override directories for kolla-ansible. For more details on
207 the available configuration options, see the section below.
208
209 ./etc/kolla/config/cinder/cinder-volume.conf
210 ----
211 [linstor-drbd]
212 volume_backend_name = linstor-drbd
213 volume_driver = cinder.volume.drivers.linstordrv.LinstorDrbdDriver
214 linstor_uris = linstor://cinder-01.openstack.test,linstor://cinder-02.openstack.test
215 ----
216
217 ===== OpenStack Ansible
218
219 https://docs.openstack.org/openstack-ansible/[OpenStack Ansible] provides Ansible playbooks to configure and deploy of
220 OpenStack environments. It allows for fine-grained customization of the deployment, letting you set up the Linstor
221 driver directly.
222
223 ./etc/openstack_ansile/user_variables.yml
224 ----
225 cinder_git_repo: https://github.com/LINBIT/openstack-cinder.git
226 cinder_git_install_branch: linstor/stable/victoria
227
228 cinder_user_pip_packages:
229 - python-linstor
230
231 cinder_backends: <1>
232 linstor-drbd:
233 volume_backend_name: linstor-drbd
234 volume_driver: cinder.volume.drivers.linstordrv.LinstorDrbdDriver
235 linstor_uris: linstor://cinder-01.openstack.test,linstor://cinder-02.openstack.test
236 ----
237
238 <1> A detailed description of the available backend parameters can be found in the section below
239
240 ===== Generic Cinder deployment
241
242 For other forms of OpenStack deployments, this guide can only provide non-specific hints.
243
244 To update the Linstor driver version, find your cinder installation. Some likely paths are:
245
246 ----
247 /usr/lib/python3.6/dist-packages/cinder/
248 /usr/lib/python3.6/site-packages/cinder/
249 /usr/lib/python2.7/dist-packages/cinder/
250 /usr/lib/python2.7/site-packages/cinder/
251 ----
252
253 The Linstor driver consists of a single file called `linstordrv.py`, located in the Cinder directory:
254
255 ----
256 $CINDER_PATH/volume/drivers/linstordrv.py
257 ----
258
259 To update the driver, replace the file with one from the LINBIT repository
260
261 ----
262 RELEASE=linstor/stable/victoria
263 curl -fL "https://raw.githubusercontent.com/LINBIT/openstack-cinder/$RELEASE/cinder/volume/drivers/linstordrv.py" > $CINDER_PATH/volume/drivers/linstordrv.py
264 ----
265
266 You might also need to remove the Python cache for the update to be registered:
267
268 ----
269 rm -rf $CINDER_PATH/volume/drivers/__pycache__
270 ----
271
272 === Configure a Linstor Backend for Cinder
273
274 To use the Linstor driver, configure the Cinder volume service. This is done by editing the Cinder configuration file
275 and then restarting the Cinder Volume service.
276
277 Most of the time, the Cinder configuration file is located at `/etc/cinder/cinder.conf`. Some deployment options allow
278 manipulating this file in advance. See the section above for specifics.
279
280 To configure a new volume backend using Linstor, add the following section to `cinder.conf`
281
282 ----
283 [linstor-drbd]
284 volume_backend_name = linstor-drbd <1>
285 volume_driver = cinder.volume.drivers.linstordrv.LinstorDrbdDriver <2>
286 linstor_uris = linstor://cinder-01.openstack.test,linstor://cinder-02.openstack.test <3>
287 linstor_trusted_ca = /path/to/trusted/ca.cert <4>
288 linstor_client_key = /path/to/client.key <5>
289 linstor_client_cert = /path/to/client.cert <5>
290 # Deprecated or removed in 2.0.0
291 linstor_default_storage_pool_name = cinderpool <6>
292 linstor_autoplace_count = 2 <7>
293 linstor_controller_diskless = true <8>
294 # non-linstor-specific options
295 ... <9>
296 ----
297
298 NOTE: The parameters described here are based on the latest release provided by Linbit. The driver included in OpenStack
299 might not support all of these parameters. Take a look at the
300 https://docs.openstack.org/cinder/latest/configuration/block-storage/drivers/linstor-driver.html[OpenStack driver documentation]
301 to find out more.
302
303 <1> The name of the volume backend. Needs to be unique in the Cinder configuration. The whole section should share the
304 same name. This name is referenced again in `cinder.conf` in the `enabled_backends` setting and when creating a new
305 volume type.
306
307 <2> The version of the Linstor driver to use. There are two options:
308 * `cinder.volume.drivers.linstordrv.LinstorDrbdDriver`
309 * `cinder.volume.drivers.linstordrv.LinstorIscsiDriver`
310 +
311 Which driver you should use depends on your Linstor set up and requirements. Details on each choice are documented in
312 <<s-openstack-linstor-transport-options, the section below.>>
313
314 <3> The URL(s) of the Linstor Controller(s). Multiple Controllers can be specified to make use of
315 <<s-linstor_ha,Linstor High Availability>>. If not set, defaults to `linstor://localhost`.
316 +
317 NOTE: In driver versions prior to 2.0.0, this option is called `linstor_default_uri`
318
319 <4> If <<s-linstor-rest-api-https,HTTPS is enabled>> the referenced certificate is used to verify the Linstor Controller
320 authenticity.
321
322 <5> If <<s-linstor-rest-api-https,HTTPS is enabled>> the referenced key and certificate will be presented to the Linstor
323 Controller for authentication.
324
325 <6> *Deprecated in 2.0.0, use <<s-openstack-volume-types,volume types>> instead.* The storage pools to use when placing
326 resources. Applies to all diskfull resources created. Defaults to `DfltStorPool`.
327
328 <7> *Removed in 2.0.0, use <<s-openstack-volume-types,volume types>> instead.* The number of replicas to create for the given
329 volume. A value of `0` will create a replica on all nodes. Defaults to `0`.
330
331 <8> *Removed in 2.0.0, volumes are created on demand by the driver.* If set to true, ensures that at least one (diskless) replica is deployed on the Cinder Controller host. This is
332 useful for ISCSI transports. Defaults to `true`.
333
334 <9> You can specify more generic Cinder options here, for example `target_helper = tgtadm` for the ISCSI connector.
335
336 NOTE: You can also configure multiple Linstor backends, choosing a different name and configuration options for each.
337
338 After configuring the Linstor backend, it should also be enabled. Add it to the list of enabled backends in `cinder.conf`,
339 and optionally set is as the default backend:
340 ----
341 [DEFAULT]
342 ...
343 default_volume_type = linstor-drbd-volume
344 enabled_backends = lvm,linstor-drbd
345 ...
346 ----
347
348 As a last step, if you changed the Cinder configuration or updated the driver itself, make sure to restart the Cinder
349 service(s). Please check the documentation for your OpenStack Distribution on how to restart services.
350
351 [[s-openstack-linstor-transport-options]]
352 ==== Choice of Transport Protocol
353
354 The Transport Protocol in Cinder is how clients (for example nova-compute) access the actual volumes. With Linstor, you
355 can choose between two different drivers that use different transports.
356
357 * `cinder.volume.drivers.linstordrv.LinstorDrbdDriver`, which uses DRBD as transport
358 * `cinder.volume.drivers.linstordrv.LinstorIscsiDriver`, which uses ISCSI as transport
359
360 ===== Using DRBD as Transport Protocol
361
362 The `LinstorDrbdDriver` works by ensuring a replica of the volume is available locally on the node where
363 a client (i.e. nova-compute) issued a request. This only works if _all_ compute nodes are also running
364 Linstor Satellites that are part of the same Linstor cluster.
365
366 The advantages of this option are:
367
368 * Once set up, the Cinder host is no longer involved in the data path. All read and write to the volume are
369 handled by the local DRBD module, which will handle replication across its configured peers.
370 * Since the Cinder host is not involved in the data path, any disruptions to the Cinder service do not affect
371 volumes that are already attached.
372
373 ====== Known limitations:
374
375 * Not all hosts and hypervisors support using DRBD volumes. This restricts deployment to Linux hosts and `kvm` hypervisors.
376 * Resizing of attached and in-use volumes does not fully work. While the resize itself is successful, the compute service
377 will not propagate it to the VM until after a restart.
378 * Multi-attach (attaching the same volume on multiple VMs) is not supported.
379 * https://docs.openstack.org/cinder/latest/configuration/block-storage/volume-encryption.html#create-an-encrypted-volume-type[Encrypted volumes]
380 only work if udev rules for DRBD devices are in place.
381 +
382 NOTE: `udev` rules are either part of the `drbd-utils` package or have their own `drbd-udev` package.
383
384 ===== Using ISCSI as Transport Protocol
385
386 The default way to export Cinder volumes is via iSCSI. This brings the
387 advantage of maximum compatibility - iSCSI can be used with every hypervisor,
388 be it VMWare, Xen, HyperV, or KVM.
389
390 The drawback is that all data has to be sent to a Cinder node, to be processed
391 by an (userspace) iSCSI daemon; that means that the data needs to pass the
392 kernel/userspace border, and these transitions will cost some performance.
393
394 Another drawback is the introduction of a single point of failure. If a Cinder
395 node running the iSCSI daemon crashes, other nodes lose access to their volumes.
396 There are ways to configure Cinder for automatic fail-over to mitigate this, but
397 it requires considerable effort.
398
399 NOTE: In driver versions prior to 2.0.0, the Cinder host needs access to a local replica of every volume. This can be
400 achieved by either setting `linstor_controller_diskless=True` or using `linstor_autoplace_count=0`. Newer driver
401 versions will create such a volume on demand.
402
403 [[s-openstack-linstor-backend-status]]
404 ==== Verify status of Linstor backends
405
406 To verify that all backends are up and running, you can use the OpenStack command line client:
407
408 [source,shell]
409 ----
410 $ openstack volume service list
411 +------------------+----------------------------------------+------+---------+-------+----------------------------+
412 | Binary | Host | Zone | Status | State | Updated At |
413 +------------------+----------------------------------------+------+---------+-------+----------------------------+
414 | cinder-scheduler | cinder-01.openstack.test | nova | enabled | up | 2021-03-10T12:24:37.000000 |
415 | cinder-volume | cinder-01.openstack.test@linstor-drbd | nova | enabled | up | 2021-03-10T12:24:34.000000 |
416 | cinder-volume | cinder-01.openstack.test@linstor-iscsi | nova | enabled | up | 2021-03-10T12:24:35.000000 |
417 +------------------+----------------------------------------+------+---------+-------+----------------------------+
418 ----
419
420 If you have the Horizon GUI deployed, check `Admin > System Information > Block Storage Service` instead.
421
422 In the above example all configured services are `enabled` and `up`. If there are any issues, please check
423 the logs of the Cinder Volume service.
424
425 [[s-openstack-volume-types]]
426 === Create a new volume type for Linstor
427
428 Before creating volumes using Cinder, you have to create a volume type. This can either be done via the command line:
429
430 [source,shell]
431 ----
432 # Create a volume using the default backend
433 $ openstack volume type create default
434 +-------------+--------------------------------------+
435 | Field | Value |
436 +-------------+--------------------------------------+
437 | description | None |
438 | id | 58365ffb-959a-4d91-8821-5d72e5c39c26 |
439 | is_public | True |
440 | name | default |
441 +-------------+--------------------------------------+
442 # Create a volume using a specific backend
443 $ openstack volume type create --property volume_backend_name=linstor-drbd linstor-drbd-volume
444 +-------------+--------------------------------------+
445 | Field | Value |
446 +-------------+--------------------------------------+
447 | description | None |
448 | id | 08562ea8-e90b-4f95-87c8-821ac64630a5 |
449 | is_public | True |
450 | name | linstor-drbd-volume |
451 | properties | volume_backend_name='linstor-drbd' |
452 +-------------+--------------------------------------+
453 ----
454
455 Alternatively, you can create volume types via the Horizon GUI. Navigate to `Admin > Volume > Volume Types` and click
456 "Create Volume Type". You can assign it a backend by adding the `volume_backend_name` as "Extra Specs" to it.
457
458 ==== Advanced Configuration of volume types
459
460 Each volume type can be customized by adding properties or "Extra Specs" as they are called in the Horizon GUI.
461
462 To add a property to a volume type on the command line use:
463 ----
464 openstack volume type set linstor_drbd_b --property linstor:redundancy=5
465 ----
466
467 Alternatively, you can set the property via the GUI by navigating tp `Admin > Volume > Volume Types`. In the `Actions`
468 column, open the dropdown menu and click the `View Extra Specs` button. This opens a dialog you can use to create, edit
469 and delete properties.
470
471 ===== Available volume type properties
472
473 linstor:diskless_on_remaining::
474 Create diskless replicas on non-selected nodes after auto-placing.
475
476 linstor:do_not_place_with_regex::
477 Do not place the resource on a node which has a resource with a name matching the regex.
478
479 linstor:layer_list::
480 Comma-separated list of layers to apply for resources. If empty, defaults to DRBD,Storage.
481
482 linstor:provider_list::
483 Comma-separated list of providers to use. If empty, Linstor will automatically choose a suitable provider.
484
485 linstor:redundancy::
486 Number of replicas to create. Defaults to 2.
487
488 linstor:replicas_on_different::
489 A comma-separated list of key or key=value items used as autoplacement selection labels when autoplace is used to
490 determine where to provision storage.
491
492 linstor:replicas_on_same::
493 A comma-separated list of key or key=value items used as autoplacement selection labels when autoplace is used to
494 determine where to provision storage.
495
496 linstor:storage_pool::
497 Comma-separated list of storage pools to use when auto-placing.
498
499 linstor:property:*::
500 If a key is prefixed by `linstor:property:`, it is interpreted as a LINSTOR property. The property gets set on the <<s-linstor-resource-groups,Resource Group>>
501 created for the volume type.
502 +
503 For example: To change the <<s-linstor-auto-quorum,quorum policy>> `DrbdOptions/auto-quorum` needs to be set. This can
504 be done by setting the `linstor:property:DrbdOptions/auto-quorum` property.
505
506 === Using volumes
507
508 Once you have a volume type configured, you can start using it to provision new volumes.
509
510 For example, to create a simple 1Gb volume on the command line you can use:
511 [source,shell]
512 ----
513 openstack volume create --type linstor-drbd-volume --size 1 --availability-zone nova linstor-test-vol
514 openstack volume list
515 ----
516
517 NOTE: If you set `default_volume_type = linstor-drbd-volume` in your `/etc/cinder/cinder.conf`,
518 you may omit the `--type linstor-drbd-volume` from the `openstack volume create ...` command above.
519
520 === Troubleshooting
521
522 This section describes what to do in case you encounter problems with using Linstor volumes and snapshots.
523
524 ==== Checking for error messages in Horizon
525
526 Every volume and snapshot has a Messages tab in the Horizon dashboard. In case of errors, the list of messages can
527 be used as a starting point for further investigation. Some common messages in case of errors:
528
529 create volume from backend storage:Driver failed to create the volume.
530
531 There was an error creating a new volume. Check the Cinder Volume service logs for more details
532
533 schedule allocate volume:Could not find any available weighted backend.
534
535 If this is the only error message, this means the Cinder Scheduler could not find a volume backend suitable for creating
536 the volume. This is most likely because:
537
538 * The volume backend is offline. See <<s-openstack-linstor-backend-status>>
539 * The volume backend has not enough free capacity to fulfil the request. Check the output of `cinder get-pools --detail`
540 and `linstor storage-pool list` to ensure that the requested capacity is available.
541
542 ==== Checking the Cinder Volume Service
543
544 The Linstor driver is called as part of the Cinder Volume service.
545
546 [frame="topbot",options="header"]
547 |====
548 | Distribution | Log location or command
549 | DevStack | `journalctl -u devstack@c-vol`
550 |====
551
552 ==== Checking the compute srvice logs
553
554 Some issues will not be logged in the Cinder Service but in the actual consumer of the volumes, most likely the compute
555 service (Nova). As with the volume service, the exact host and location to check depends on your Openstack distribution:
556
557 [frame="topbot",options="header"]
558 |====
559 | Distribution | Log location or command
560 | DevStack | `journalctl -u devstack@n-cpu`
561 |====
562
563 // Keep the empty line before this comment, otherwise the next chapter is folded into this