Attaching iSCSI volumes to target groups
To attach a volume to a target group, use the vstorage-target tg-attach
command. A volume cannot be attached to multiple target groups at the same time. For example:
# vstorage-target tg-attach -id 3d8364f5-b830-4211-85af-3a19d30ebac4 \ -volume 3277153b-5296-49c5-9b66-4c200ddb343d -lun 0 -node bbfd0e7a26b1406d
This command attaches the volume with the ID 3277153b-5296-49c5-9b66-4c200ddb343d
to a target group with the ID 3d8364f5-b830-4211-85af-3a19d30ebac4
as LUN 0. LUN ID numbering must start with 0. The same command sets the PREFERRED
bit to the node with the ID bbfd0e7a26b1406d
. The default Active/Optimized path will go via this node.