How to get storage size through Proxmox API?

Egor

New Member
Nov 21, 2016
28
1
3
33
I want to get the following info as in screenshot:
upload_2017-3-7_14-42-50.png

For now, I only know about the command 'pvesh get /storage' which gives me the following info:
[
{
"content" : "images,rootdir",
"digest" : "b6b926339dcd532a2a6e2d8a145ba4cc6c95363d",
"storage" : "local-lvm",
"thinpool" : "data",
"type" : "lvmthin",
"vgname" : "pve"
},
{
"content" : "backup,vztmpl,iso",
"digest" : "b6b926339dcd532a2a6e2d8a145ba4cc6c95363d",
"path" : "/var/lib/vz",
"storage" : "local",
"type" : "dir"
}
]
 

Attachments

  • upload_2017-3-7_14-42-34.png
    upload_2017-3-7_14-42-34.png
    32 KB · Views: 4
storage status (including total and used space) is per node, so take a look at the API path /nodes/NODENAME/storage and its children. the API path /storage is for the storage configuration (i.e.., /etc/pve/storage.cfg)
 
storage status (including total and used space) is per node, so take a look at the API path /nodes/NODENAME/storage and its children. the API path /storage is for the storage configuration (i.e.., /etc/pve/storage.cfg)

Thank you!
One more question. What does the following number mean?

'pvesh get /nodes'
[
{
...,
"disk" : 2990235648
...
}
]

What kind of disk is that? Is that an aggregate storage capacity?
 
no, it's used and total space of the / partition (you can get more node stats via "GET /nodes/NODENAME/status")