Attaching volumes to target groups
Prerequisites
- Volumes are created, as described in Creating volumes.
To add a volume as a LUN to a target group
Admin panel
- Open Storage services > Block storage > Target groups, click the ellipsis icon of the desired target group, and then click Add LUNs.
-
In the Attach window, select volumes to attach to the target group (create them if needed), and then click Attach.
Alternatively, you can do the same on the Volumes tab:
Command-line interface
Use the following command:
vinfra service block-storage target-group volume attach [--lun <lun>] <target-group> <name>
--lun <lun>
- Lun ID
<target-group>
- Target group name or ID
<name>
- Volume name or ID
For example, to attach the volume vol1
to the target group tg1
as LUN 0
, run:
# vinfra service block-storage target-group volume attach --lun 0 tg1 vol1
The attached volume will appear in the vinfra service block-storage target-group volume list
output:
# vinfra service block-storage target-group volume list tg1 +--------------------------------------+--------------+------+--------------+-----------+ | id | serial | name | size | used_size | +--------------------------------------+--------------+------+--------------+-----------+ | 9841d72f-5d68-4659-82d5-cd96cf1031b6 | cd96cf1031b6 | vol1 | 107374182400 | 1048576 | +--------------------------------------+--------------+------+--------------+-----------+