Get the quota info:
# openstack quota show
+----------------------+--------+
| Field | Value |
+----------------------+--------+
| gigabytes | 40000
| gigabytes_ceph_spec | 20000
Get the hypervisor stats:
# openstack hypervisor stats show
+----------------------+-------+
| Field | Value |
+----------------------+-------+
| count | 1 |
| current_workload | 0 |
| disk_available_least | 491 |
| free_disk_gb | 796 |
| free_ram_mb | 19326 |
| local_gb | 916 |
| local_gb_used | 120 |
| memory_mb | 32126 |
| memory_mb_used | 12800 |
| running_vms | 4 |
| vcpus | 4 |
| vcpus_used | 12 |
+----------------------+-------+
How could I get the gigabytes_ceph_spec or gigabytes's resource usage like openstack hypervisor stats show or other methods?
If your compute nodes are connected to ceph the available space is already taken into account. For reference I'll paste some information from one of my compute nodes (CephFS is mounted as shared storage for live-migration):
My ceph cluster currently has around 470 TB available space and around 200 GB local disk space which add up to the 496 TB.
The closest thing within cinder seems to be this command:
I don't think there's currently a way to determine this from the openstack side, you'll have to check ceph for more detailed information.