Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How-To Get Consolidate Size Information of all The Cinder Volumes Provisioned
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
Need to obtain the consolidated size of all the volumes provisioned in a Region for capacity planning.
Environment
- Platform9 Managed OpenStack - All Versions.
- Cinder
Procedure
- The following script can be used, it gives an option to either get only the size of the volumes in use or the size of the volumes created except the ones which are in the error state.
#!/bin/bashcalsize() { export volsize=0 for vol in $volumes do s=$(openstack volume show $vol -c size -f value) volsize=$((volsize+s)) done echo "Tatal volume size in Gb= $volsize"}echo " select from the below 1) in-use volume size 2) total size of the volumes created "read Selectioncase $Selection in1) echo "##calculating size of the volumes in-use##" export volumes=$(openstack volume list --all -f value | awk '{if($3 == "in-use" || $2 == "in-use") print $1}') calsize;;2) echo "##calculating size of all the volumes created and not in error state" export volumes=$(openstack volume list --all -f value | awk '{if($2 != "error" && $3 != "error") print $1}') calsize;;esacVariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message