咨询一下,如果我创建了UNIT,RESOURCE POOL,但不关联租户,实际资源池会是占用状态吗

咨询一下,如果我创建了UNIT,RESOURCE POOL,但不关联租户,实际资源池会是分配占用状态吗

create unit config ... 不会分配资源,但是 create resource pool ... 那一步会分配资源。
此后如果没有 create tenant ... 关联这片资源,这个资源等于是“无主”状态,无法被利用,就浪费了。

所以下面的查看资源的 sql ,对 __all_tenant 要用left join

select t1.name resource_pool_name, t2.`name` unit_config_name, 
	t2.max_cpu, t2.min_cpu, 
	round(t2.memory_size/1024/1024/1024,2) mem_size_gb,
	round(t2.log_disk_size/1024/1024/1024,2) log_disk_size_gb, t2.max_iops, 
	t2.min_iops, t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer,
	t4.tenant_id, t4.tenant_name
from __all_resource_pool t1
	join __all_unit_config t2 on (t1.unit_config_id=t2.unit_config_id)
	join __all_unit t3 on (t1.`resource_pool_id` = t3.`resource_pool_id`)
	left join __all_tenant t4 on (t1.tenant_id=t4.tenant_id)
order by t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id;
3 个赞

好的 感谢

庆涛老师 :+1: :+1: