查看cinder 服务
stack@map-VirtualBox:~/devstack$ cinder-manage service list
/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py:241: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
2016-02-02 17:12:42.575 DEBUG oslo_db.sqlalchemy.engines [req-0609a605-fe45-4070-85b3-3cc1c284478a None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION from (pid=5450) _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:256
Binary Host Zone Status State Updated At
cinder-scheduler map-VirtualBox nova enabled :-) 2016-02-02 09:12:40
cinder-volume map-VirtualBox@lvmdriver-1 nova enabled XXX 2015-12-10 13:50:56
重启cinder-volume 服务,查看日志如下
me stack-volumes-lvmdriver-1' failed. Not Retrying. from (pid=5511) execute /usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:345
2016-02-02 17:14:16.823 ERROR cinder.volume.manager [req-56ff90cc-c9f4-4ae1-a912-d768e2ac555a None None] Failed to initialize driver.
2016-02-02 17:14:16.823 TRACE cinder.volume.manager Traceback (most recent call last):
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 374, in init_host
2016-02-02 17:14:16.823 TRACE cinder.volume.manager self.driver.check_for_setup_error()
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2016-02-02 17:14:16.823 TRACE cinder.volume.manager return f(*args, **kwargs)
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 269, in check_for_setup_error
2016-02-02 17:14:16.823 TRACE cinder.volume.manager lvm_conf=lvm_conf_file)
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 95, in __init__
2016-02-02 17:14:16.823 TRACE cinder.volume.manager if self._vg_exists() is False:
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/brick/local_dev/lvm.py", line 128, in _vg_exists
2016-02-02 17:14:16.823 TRACE cinder.volume.manager run_as_root=True)
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/opt/stack/cinder/cinder/utils.py", line 154, in execute
2016-02-02 17:14:16.823 TRACE cinder.volume.manager return processutils.execute(*cmd, **kwargs)
2016-02-02 17:14:16.823 TRACE cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 312, in execute
2016-02-02 17:14:16.823 TRACE cinder.volume.manager cmd=sanitized_cmd)
2016-02-02 17:14:16.823 TRACE cinder.volume.manager ProcessExecutionError: Unexpected error while running command.
2016-02-02 17:14:16.823 TRACE cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C vgs --noheadings -o name stack-volumes-lvmdriver-1
2016-02-02 17:14:16.823 TRACE cinder.volume.manager Exit code: 5
2016-02-02 17:14:16.823 TRACE cinder.volume.manager Stdout: u''
2016-02-02 17:14:16.823 TRACE cinder.volume.manager Stderr: u' Volume group "stack-volumes-lvmdriver-1" not found\n'
2016-02-02 17:14:16.823 TRACE cinder.volume.manager
2016-02-02 17:14:16.992 DEBUG oslo_db.sqlalchemy.engines [req-41afd90c-315f-4849-b2bf-3fe59200d84f None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_
原来devstack 没有创建vg ,手动创建vg如下
执行truncate -s 15G vg_file
root@map-VirtualBox:/etc/cinder# losetup -f --show vg_file
/dev/loop0
root@map-VirtualBox:/etc/cinder# vgcreate stack-volumes-lvmdriver-1 /dev/loop0
No physical volume label read from /dev/loop0
Physical volume "/dev/loop0" successfully created
Volume group "stack-volumes-lvmdriver-1" successfully created
查看vg
root@map-VirtualBox:/etc/cinder# vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 29.76 GiB
PE Size 4.00 MiB
Total PE 7618
Alloc PE / Size 7618 / 29.76 GiB
Free PE / Size 0 / 0
VG UUID Aw7FHt-cpbI-Gmh8-ucWw-Er0m-Iwwk-bbnbph
--- Volume group ---
VG Name stack-volumes-lvmdriver-1
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 15.00 GiB
PE Size 4.00 MiB
Total PE 3839
Alloc PE / Size 0 / 0
Free PE / Size 3839 / 15.00 GiB
VG UUID bL39qA-u2om-HDBg-yvQs-KI5w-32C1-fc3bJH
stack@map-VirtualBox:~/devstack$ cinder-manage service list
Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
/usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py:241: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
2016-02-02 17:19:07.350 DEBUG oslo_db.sqlalchemy.engines [req-de72c57b-dc3c-44d5-bb0a-107f8f0ac8db None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION from (pid=5733) _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:256
Binary Host Zone Status State Updated At
cinder-scheduler map-VirtualBox nova enabled :-) 2016-02-02 09:19:00
cinder-volume map-VirtualBox@lvmdriver-1 nova enabled :-) 2016-02-02 09:19:04