Skip to content

Instantly share code, notes, and snippets.

@dabukalam
Created January 8, 2019 13:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dabukalam/89b4f1af82b682f7b0fbf6f82c96dd9a to your computer and use it in GitHub Desktop.
Save dabukalam/89b4f1af82b682f7b0fbf6f82c96dd9a to your computer and use it in GitHub Desktop.
#!/bin/bash
NODES=(redfox silverfox swiftfox kitfox)
(
for ((i=0;i<100;i++)); do
echo resource-definition create tr$i
echo volume-definition create tr$i 50G
#linstor resource create --async --auto-place 2 --storage-pool ssdthin tr$i
# autoplace does not distribute the resources on a thin pool.
i1=$((i % ${#NODES[*]}))
i2=$(((i+1) % ${#NODES[*]}))
echo resource create --async --storage-pool ssdthin ${NODES[$i1]} ${NODES[$i2]} tr$i
done
) | linstor interactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment