openstack计算节点的zone划分

2023-05-16

初步了解了一些openstack zone的使用方法,觉得比较实用,在此分享给大家:

nova aggregate-list  

Print a list of all aggregates.  

# nova aggregate-create <name> <availability-zone>  

Create a new aggregate named <name> in availability zone <availability-zone>. Returns the ID of the newly created aggregate.  

# nova aggregate-delete <id>  

Delete an aggregate with id <id>.  

# nova aggregate-details <id>  

Show details of the aggregate with id <id>.   

# nova aggregate-add-host <id> <host>  

Add host with name <host> to aggregate with id <id>.  

# nova aggregate-remove-host <id> <host>  

Remove the host with name <host> from the aggregate with id <id>.  

# nova aggregate-set-metadata <id> <key=value> [<key=value> ...]  

Add or update metadata (key-value pairs) associated with the aggregate with id <id>.  

# nova aggregate-update <id> <name> [<availability_zone>]  

Update the aggregate's name and optionally availability zone.    

# nova host-list  

List all hosts by service.  

# nova host-update --maintenance [enable | disable]  

Put/resume host into/from maintenance.

http://docs.openstack.org/grizzly/openstack-compute/admin/content/host-aggregates.html

举例:

[root@openstack ~]# nova aggregate-list

+----+------+-------------------+

| Id | Name | Availability Zone |

+----+------+-------------------+

+----+------+-------------------+

[root@openstack03 ~]# nova aggregate-create clusterA cluster-12C-128G

+----+----------+-------------------+-------+--------------------------------------+

| Id | Name     | Availability Zone | Hosts | Metadata                             |

+----+----------+-------------------+-------+--------------------------------------+

| 1  | clusterA | cluster-12C-128G  |       | 'availability_zone=cluster-12C-128G' |

+----+----------+-------------------+-------+--------------------------------------+

[root@openstack03 ~]# nova aggregate-create clusterB cluster-12C-48G

+----+----------+-------------------+-------+-------------------------------------+

| Id | Name     | Availability Zone | Hosts | Metadata                            |

+----+----------+-------------------+-------+-------------------------------------+

| 2  | clusterB | cluster-12C-48G   |       | 'availability_zone=cluster-8C-48G' |

+----+----------+-------------------+-------+-------------------------------------+

[root@openstack03 ~]# nova aggregate-list

+----+----------+-------------------+

| Id | Name     | Availability Zone |

+----+----------+-------------------+

| 1  | clusterA | cluster-12C-128G  |

| 2  | clusterB | cluster-8C-48G   |

+----+----------+-------------------+

[root@openstack03 ~]# nova aggregate-list

+----+----------+-------------------+

| Id | Name     | Availability Zone |

+----+----------+-------------------+

| 1  | clusterA | cluster-12C-128G  |

| 3  | clusterB | cluster-8C-48G    |

+----+----------+-------------------+

[root@openstack03 ~]# nova aggregate-add-host 1 node01

Host node01 has been successfully added for aggregate 1 

+----+----------+-------------------+----------+--------------------------------------+

| Id | Name     | Availability Zone | Hosts    | Metadata                             |

+----+----------+-------------------+----------+--------------------------------------+

| 1  | clusterA | cluster-12C-128G  | 'node01' | 'availability_zone=cluster-12C-128G' |

+----+----------+-------------------+----------+--------------------------------------+

[root@openstack03 ~]# nova aggregate-add-host 2 node02

Host node02 has been successfully added for aggregate 2 

+----+----------+-------------------+--------------------+--------------------------------------+

| Id | Name     | Availability Zone | Hosts              | Metadata                             |

+----+----------+-------------------+--------------------+--------------------------------------+

| 1  | clusterA | cluster-8C-48G  | 'node02' | 'availability_zone=cluster-8C-48G' |

+----+----------+-------------------+--------------------+--------------------------------------

转载于:https://www.cnblogs.com/myiaas/p/4161319.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

openstack计算节点的zone划分 的相关文章

随机推荐