You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
. Restart the master. The nodes should be restarted automatically after the
257
+
configuration change (it may take several minutes).
258
+
259
+
[[local-volume-prepare-block-devices]]
260
+
==== Prepare the Block Devices
261
+
Before starting the provisioner all the block devices that should be available
262
+
to the pods need to be linked to the *_/mnt/local-storage/<storage class>_* directory
263
+
structure. Example: to make a device *_/dev/dm-36_* available:
264
+
265
+
. Create a directory for its `StorageClass` in *_/mnt/local-storage_*:
266
+
+
267
+
[source, bash]
268
+
----
269
+
$ mkdir -p /mnt/local-storage/block-devices
270
+
----
271
+
272
+
. Create a symbolic link that would point to the device:
273
+
+
274
+
[source, bash]
275
+
----
276
+
$ ln -s /dev/dm-36 dm-uuid-LVM-1234
277
+
----
278
+
+
279
+
[NOTE]
280
+
====
281
+
It is a good practice to use the same name for the symbolic link as the link
282
+
from *_/dev/disk/by-uuid_* or *_/dev/disk/by-id_* directory to avoid possible name conflicts.
283
+
====
284
+
285
+
. Create or update the `ConfigMap` configuring the provisioner:
286
+
+
287
+
[source, yaml]
288
+
----
289
+
kind: ConfigMap
290
+
metadata:
291
+
name: local-volume-config
292
+
data:
293
+
storageClassMap: |
294
+
block-devices: <1>
295
+
hostDir: /mnt/local-storage/block-devices <2>
296
+
mountDir: /mnt/local-storage/block-devices <3>
297
+
----
298
+
<1> Name of the StorageClass.
299
+
<2> Path to the directory on the host. It must be a subdirectory of *_/mnt/local-storage_*.
300
+
<3> Path to the directory in the provisioner pod. We recommend using the same directory structure as used on the host and `mountDir` can be omitted in this case.
301
+
. Change the SELinux label of the device and the *_/mnt/local-storage/_*:
0 commit comments