获取配额信息:
# openstack quota show
+----------------------+--------+
| Field | Value |
+----------------------+--------+
| gigabytes | 40000
| gigabytes_ceph_spec | 20000 获取系统管理程序的统计数据:
# 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 |
+----------------------+-------+如何获得gigabytes_ceph_spec或gigabytes的资源使用情况,如openstack hypervisor stats show或其他方法?
发布于 2022-02-25 11:05:36
如果您的计算节点连接到ceph,则已经考虑到可用的空间。作为参考,我将粘贴来自我的一个计算节点的一些信息(CephFS被挂载为用于实时迁移的共享存储):
| disk_available_least | 64180 --> free disk space incl. cephfs (df -h)
| free_disk_gb | 496620 --> local_gb - local_gb_used
| local_gb | 496786 --> local disk space + ceph available space
| local_gb_used | 166 --> "DISK_GB" allocations from placement api我的ceph集群目前有大约470 TB可用空间和大约200 GB本地磁盘空间,这相当于496 TB。
在灰烬中最接近的似乎是这样的命令:
control:~ # cinder summary --all-tenants
+-------------+---------------------------------------------------+
| Property | Value |
+-------------+---------------------------------------------------+
| metadata | cinder.csi.openstack.org/cluster : ['kubernetes'] |
| total_count | 127 |
| total_size | 5660 |
+-------------+---------------------------------------------------+我认为目前还没有一种方法可以从openstack端确定这一点,您必须查看ceph以获得更详细的信息。
发布于 2022-03-22 07:32:35
我通过为配额设置一个小值来找到一个哑方法,并从错误提示中获得当前分配的值。
$ openstack quota set --gigabytes 1 --volume-type ceph_spec proj_name
Quota gigabytes_ceph_spec limit must be equal or greater than existing resources.
Current usage is 2048 and the requested limit is 1. (HTTP 400) (Request-ID: req-c1***)现在我知道使用了2048G of gigabytes_ceph_spec。
https://stackoverflow.com/questions/71175452
复制相似问题