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 b8743eb
Browse filesBrowse the repository at this point in the historyBrowse files
Storage Volume page - How to manage storage volumes:
- View storage volumes
- Create a custom storage volume
- Attach the volume to an instance
- Configure storage volume settings
- [Added] Create a storage volume in a cluster
[ X ] - Storage volumes images optimised
Copy file name to clipboardExpand all lines: doc/howto/storage_volumes.md
+150-8Lines changed: 150 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
+
From the main navigation, select {guilabel}`Storage` > {guilabel}`Volumes`.
47
+
The resulting page displays a table of available volumes. You can sort volumes by their pool by clicking the {guilabel}`Pool` column header 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,52 @@ 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
+
162
+
```` {group-tab} UI
163
+
You can attach a storage volume to an existing instance, or when creating a new instance:
164
+
165
+
- For an existing instance, select {guilabel}`Instances` from the main navigation, then select the target instance to view its details page. Open its {guilabel}`Configuration` tab.
166
+
- For a new instance, you must first select a base image during the instance creation process.
167
+
168
+
In either scenario, then select {guilabel}`Disk` from the {guilabel}`Devices` section of the secondary menu.
:alt: Attach a storage volume to an instance - Attach disk device modal
182
+
```
183
+
184
+
Next, you can either select a pre-existing volume to attach to the instance by clicking its corresponding {guilabel}`Select` button, or create a new custom volume by clicking {guilabel}`Create volume`:
:alt: Attach a storage volume to an instance - Attach custom volume modal
189
+
```
190
+
191
+
Once the modal closes, you might be required to add a mount point file path in the {guilabel}`Mount point` field.
192
+
Finally, you can save your instance changes. If you are in the instance creation process, create your instance by clicking {guilabel}`Create`.
193
+
194
+
195
+
````
196
+
`````
197
+
134
198
(storage-volume-special)=
135
199
### Use the volume for backups or images
136
200
137
201
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
202
203
+
`````{tabs}
204
+
````{group-tab} CLI
205
+
139
206
To do so, you must set the corresponding {ref}`server configuration <server-options-misc>`:
140
207
141
208
- To use a custom volume `my-backups-volume` to store the backup tarballs:
@@ -146,11 +213,23 @@ To do so, you must set the corresponding {ref}`server configuration <server-opti
146
213
147
214
lxc config set storage.images_volume=my-pool/my-images-volume
148
215
216
+
````
217
+
````{group-tab} UI
218
+
219
+
To use a volume to store backups or images, select {guilabel}`Settings` from the main navigation. From this page, set the value of the {guilabel}`storage.backups_volume` key or the {guilabel}`storage.images_volume` key to the name of the target storage volume, then select {guilabel}`Save`.
220
+
221
+
222
+
````
223
+
`````
224
+
149
225
(storage-configure-volume)=
150
226
## Configure storage volume settings
151
227
152
228
See the {ref}`storage-drivers` documentation for a list of available storage volume configuration options for each driver.
153
229
230
+
`````{tabs}
231
+
````{group-tab} CLI
232
+
154
233
To set the maximum size of custom storage volume `my-volume` to 1 GiB, use the following command:
155
234
156
235
lxc storage volume set my-pool my-volume size=1GiB
@@ -231,3 +310,66 @@ For example, to resize `my-volume` in storage pool `my-pool` to `15GiB`, use the
231
310
- Shrinking a storage volume with content type `block` is not possible.
232
311
233
312
```
313
+
314
+
````
315
+
```` {group-tab} UI
316
+
317
+
To configure a custom storage volume, select {guilabel}`Storage` > {guilabel}`Volumes` from the main navigation. Next, click the name of your target storage volume to view its details page.
318
+
319
+
```{note}
320
+
Volume details 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 redirect to their respective entity overview or list page.
321
+
322
+
To sort the Volumes table by type, you can click the {guilabel}`Content type` column header.
323
+
```
324
+
325
+
On the volume's overview page, 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.
326
+
After making changes, click the {guilabel}`Save changes` button. This button also displays the number of changes you have made.
327
+
328
+
````
329
+
`````
330
+
331
+
## Create a storage volume in a cluster
332
+
333
+
For most storage drivers, custom storage volumes are not replicated across the cluster and exist only on the member for which they were created.
334
+
This behavior differs for remote storage pools (`ceph`, `cephfs` and `powerflex`), where volumes are available from any cluster member.
335
+
336
+
`````{tabs}
337
+
````{group-tab} CLI
338
+
339
+
To add a custom storage volume on a cluster member, add the `--target` flag:
To create a storage volume in a clustered environment, select {guilabel}`Storage` > {guilabel}`Volumes` from the main navigation. On the Volumes page, click {guilabel}`Create volume` in the upper-right corner.
361
+
362
+
On the volume creation page, select the cluster member on which to base the storage volume from the {guilabel}`Cluster member` dropdown. This dropdown is only available if the storage pool selected for this volume is cluster-member specific, rather than shared across the cluster.
0 commit comments