Creating targets

Typically, targets are created automatically when you create target groups or add nodes to them. However, as you can delete target(s) from a node without removing the node from a target group, you can also create target(s) on such a node again. Use the vstorage-target target-create command. For example:

# vstorage-target target-create -tg 3d8364f5-b830-4211-85af-3a19d30ebac4 \
-json target.json

This command creates a target based on the target.json configuration file in the target group with the ID 3d8364f5-b830-4211-85af-3a19d30ebac4. The configuration file lists target details like the node to create the target on, WWN, and portal. For example:

{
  "NodeId": "bbfd0e7a26b1406d",
  "WWN": "iqn.2013-10.com.vstorage:test22",
  "Portals": [
    {
      "Addr": "10.94.104.90",
      "Port": 3260
    }
  ]
}