- 向 cinder-api 發送 extend 請求
- 客戶(能夠是 OpenStack 最終用戶,也能夠是其餘程序)向 cinder-api 發送請求:「請 extend 指定的 volume。」
- 這裏咱們將 extend volume 「vol-1」。進入 GUI 操做菜單 Project -> Volumes -> Volumes。
- vol-1 當前大小爲 1GB。其在存儲節點上對應的 LV 信息以下:
- 選擇 volume 「vol-1」,點擊「Extend Volume」。指定新容量爲 3GB,點擊 「Extend Volume」。
|
|
- cinder-api 將接收到 extend volume 的請求
- 查看c-api日誌文件
|
|
Jun 20 18:51:46 controller devstack@c-api.service[31309]:
INFO cinder.api.openstack.wsgi
[None req-e2d3a028-8398-4d3f-80cd-367a71c12fca admin admin]
POST http://172.16.1.17/volume/v3/51743f081cb7477f9a1f4ccdf6490d8e/volumes/f0a54...
|
|
Jun 20 18:51:46 controller devstack@c-api.service[31309]:
DEBUG cinder.api.openstack.wsgi
[None req-e2d3a028-8398-4d3f-80cd-367a71c12fca admin admin]
Action body: {"os-extend": {"new_size": 3
{{(pid=31312) get_method /opt/stack/cinder/cinder/api/openstack/wsgi.py:985
|
|
- cinder-api 發送消息
- cinder-api 發送消息 extend 消息。cinder-api 沒有打印發送消息的日誌,只能經過源代碼查看。/opt/stack/cinder/cinder/volume/api.py,方法爲 extend。
|
cloudman的:
個人:
爲何還有cinder-scheuler的參與?查看c-sch日誌
|
Jun 20 18:51:47 controller cinder-scheduler[32043]:
DEBUG cinder.scheduler.filters.capacity_filter
[None req-e2d3a028-8398-4d3f-80cd-367a71c12fca admin None]
Checking if host controller@lvmdriver-1#lvmdriver-1 can extend the volume
f0a54ac7-5423-4794-8883-d753f6a903cd in 2 GB
{{(pid=32043) backend_passes /opt/stack/cinder/cinder/scheduler/filters/capacity_filter.py:55
|
|
- cinder-volume extend volume
- cinder-volume 執行 lvextend 命令 extend volume。查看c-vol日誌:
|
|
Jun 20 18:51:47 controller cinder-volume[304]:
DEBUG oslo_concurrency.processutils
[None req-e2d3a028-8398-4d3f-80cd-367a71c12fca admin None]
Running cmd (subprocess): sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C
lvextend -L 3g stack-volumes-lvmdriver-1/volume-f0a54ac7-5423-4794-8883-d753f6a903cd
{{(pid=460) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:372
|
|
Jun 20 18:51:49 controller cinder-volume[304]:
INFO cinder.volume.manager
[None req-e2d3a028-8398-4d3f-80cd-367a71c12fca admin None]
Extend volume completed successfully.
|
|
- 結果:
- LV 被 extend 到 3GB
- GUI 也會更新 volume 的狀態信息
|
|