How to get storage size through Proxmox API?

Egor

New Member
Nov 21, 2016
28
1
3
32
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: 3
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")
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!