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
{{ message }}
Repository navigation
Commit 8192ebd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: doc/howto/storage_volumes.md
+135-8Lines changed: 135 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,9 @@ See the following sections for instructions on how to create, configure, view an
10
10
11
11
You can display a list of all available storage volumes and check their configuration.
12
12
13
+
`````{tabs}
14
+
````{group-tab} CLI
15
+
13
16
To list all available storage volumes, use the following command:
14
17
15
18
lxc storage volume list
@@ -37,6 +40,15 @@ To show state information about a specific volume, use the following command:
37
40
38
41
In both commands, the default {ref}`storage volume type <storage-volume-types>` is `custom`, so you can leave out the `custom/` when displaying information about a custom storage volume.
39
42
43
+
````
44
+
```` {group-tab} UI
45
+
46
+
To view available storage volumes in the UI, from the {guilabel}`Storage` section of the main navigation, select {guilabel}`Volumes`.
47
+
You can filter volumes by their pool by clicking on the {guilabel}`Pool` tab of the table.
48
+
49
+
````
50
+
`````
51
+
40
52
## Create a custom storage volume
41
53
42
54
When you create an instance, LXD automatically creates a storage volume that is used as the root disk for the instance.
@@ -49,6 +61,9 @@ See {ref}`storage-volumes` for detailed information.
49
61
50
62
### Create the volume
51
63
64
+
`````{tabs}
65
+
````{group-tab} CLI
66
+
52
67
Use the following command to create a custom storage volume `vol1` of type `filesystem` in storage pool `my-pool`:
53
68
54
69
lxc storage volume create my-pool vol1
@@ -57,19 +72,27 @@ By default, custom storage volumes use the `filesystem` {ref}`content type <stor
57
72
To create a custom volume with content type `block`, add the `--type` flag:
@@ -84,6 +107,9 @@ The following restrictions apply:
84
107
- Storage volumes of {ref}`content type <storage-content-types>``iso` are always read-only, and can therefore be attached to more than one virtual machine at a time without corrupting data.
85
108
- Storage volumes of {ref}`content type <storage-content-types>``filesystem` can't be attached to virtual machines while they're running.
86
109
110
+
`````{tabs}
111
+
````{group-tab} CLI
112
+
87
113
Use the following command to attach a custom storage volume `fs-vol` with content type `filesystem` to instance `c1`.
88
114
`/data` is the mount point for the storage volume inside the instance:
89
115
@@ -131,11 +157,48 @@ All I/O limits only apply to actual block device access.
131
157
Therefore, consider the file system's own overhead when setting limits.
132
158
Access to cached data is not affected by the limit.
133
159
160
+
````
161
+
```` {group-tab} UI
162
+
To attach a storage volume to an instance, navigate to the configuration page of the target instance.
163
+
164
+
In the secondary menu, expand {guilabel}`Devices` and select {guilabel}`Disk`.
:alt: Attach a storage volume to an instance - Attach disk device modal
178
+
```
179
+
180
+
Next, you can select a pre-existing volume to attach to the instance by clicking {guilabel}`Select`, or create a new custom volume by selecting {guilabel}`Create volume`.
:alt: Attach a storage volume to an instance - Attach custom volume modal
185
+
```
186
+
187
+
Once the modal closes, you may need to add a Mount Point file path in the {guilabel}`Mount point` field.
188
+
Finally, you can proceed to either save your instance changes. If you were in the instance creation process, create your instance by selecting {guilabel}`Create`.
189
+
190
+
191
+
````
192
+
`````
193
+
134
194
(storage-volume-special)=
135
195
### Use the volume for backups or images
136
196
137
197
Instead of attaching a custom volume to an instance as a disk device, you can also use it as a special kind of volume to store {ref}`backups <backups>` or {ref}`images <about-images>`.
138
198
199
+
`````{tabs}
200
+
````{group-tab} CLI
201
+
139
202
To do so, you must set the corresponding {ref}`server configuration <server-options-misc>`:
140
203
141
204
- To use a custom volume `my-backups-volume` to store the backup tarballs:
@@ -146,11 +209,24 @@ To do so, you must set the corresponding {ref}`server configuration <server-opti
146
209
147
210
lxc config set storage.images_volume=my-pool/my-images-volume
148
211
212
+
````
213
+
````{group-tab} UI
214
+
215
+
To use a volume to store backups or images, select the {guilabel}`Settings` tab of main navigation and set the {guilabel}`value` property of the {guilabel}`storage.backups_volume` key or {guilabel}`storage.images_volume` key to the name of the relevant storage volume using the provided syntax.
216
+
217
+
Select {guilabel}`Save` to save your changes.
218
+
219
+
````
220
+
`````
221
+
149
222
(storage-configure-volume)=
150
223
## Configure storage volume settings
151
224
152
225
See the {ref}`storage-drivers` documentation for a list of available storage volume configuration options for each driver.
153
226
227
+
`````{tabs}
228
+
````{group-tab} CLI
229
+
154
230
To set the maximum size of custom storage volume `my-volume` to 1 GiB, use the following command:
155
231
156
232
lxc storage volume set my-pool my-volume size=1GiB
@@ -231,3 +307,54 @@ For example, to resize `my-volume` in storage pool `my-pool` to `15GiB`, use the
231
307
- Shrinking a storage volume with content type `block` is not possible.
232
308
233
309
```
310
+
311
+
````
312
+
```` {group-tab} UI
313
+
314
+
To configure a custom storage volume, expand the {guilabel}`Storage` section of the main navigation and select {guilabel}`Volumes`. From here, select your target storage volume.
315
+
316
+
Go to the {guilabel}`Configuration` tab. Here, you can configure settings such as the storage volume size. Further configuration options can be found in the secondary menu.
317
+
After making changes, click the {guilabel}`Save changes` button. This button also displays the number of changes you have made.
318
+
319
+
Volume detail pages are only available for volumes of type Custom. Volumes of other types - such as Instance root disks - can also be accessed from the Volumes page and will redirect to their respective entity overview or list page.
320
+
321
+
To view storage volumes that are only of type Custom, whilst on the Volumes page, click {guilabel}`Content type` to filter by volume type.
322
+
323
+
````
324
+
`````
325
+
326
+
## Create a storage volume in a cluster
327
+
For most storage drivers, custom storage volumes are not replicated across the cluster and exist only on the member for which they were created.
328
+
This behavior is different for remote storage pools (`ceph`, `cephfs` and `powerflex`), where volumes are available from any cluster member.
329
+
330
+
`````{tabs}
331
+
```` {group-tab} CLI
332
+
333
+
To add a custom storage volume on cluster member `member1`, add the `--target` flag:
To create a storage volume in a clustered environment, expand the {guilabel}`Storage` section of the main navigation and navigate to the {guilabel}`Volumes` page. On the volumes list page, click {guilabel}`Create volume` in the upper right corner.
346
+
347
+
On the volume creation page, you can configure the details of your storage volume, and select the Cluster member on which the storage volume will be based by selecting an appropriate cluster member from the {guilabel}`Cluster member` dropdown. This dropdown will only be available if the selected storage pool is cluster member specific.
0 commit comments