|
|
- 啟動 openstack-cinder-volume 服務,應該會自動產生 cinder-volumes 的 vg。
" W7 {7 M" I1 w' X[root@deyu ~]# source keystonerc_myuser[root@kvm ~(keystone_myuser)]# vgscan Reading all physical volumes. This may take a while... Found volume group "cinder-volumes" using metadata type lvm2 Found volume group "vg_os" using metadata type lvm2 - 如果但查詢紀錄檔出現以下錯誤訊息,表示 vg cinder-volumes 不存在,必須自行產生。
/ _8 t$ f2 v% u- k/ a _; I[root@kvm4 ~(keystone_myuser)]# /etc/init.d/openstack-cinder-volume restart[root@deyu ~(keystone_myuser)]# tail /var/log/cinder/*==> /var/log/cinder/api.log <====> /var/log/cinder/scheduler.log <====> /var/log/cinder/volume.log <== launcher.run_server(server) File "/usr/lib/python2.6/site-packages/cinder/service.py", line 95, in run_server server.start() File "/usr/lib/python2.6/site-packages/cinder/service.py", line 355, in start self.manager.init_host() File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 143, in init_host self.driver.check_for_setup_error() File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 81, in check_for_setup_error raise exception.VolumeBackendAPIException(data=exception_message)VolumeBackendAPIException: Bad or unexpected response from the storage volume backend API: volume group cinder-volumes doesn't exist - 新增分割區,type 設為 LVM。 ; P$ s4 g4 ]: L) O6 k
[root@deyu ~(keystone_myuser)]# fdisk -uc /dev/vdaCommand (m for help): pDisk /dev/vda: 160.0 GB, 160000000000 bytes255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000b0430 Device Boot Start End Blocks Id System/dev/vda1 * 2048 1026047 512000 83 Linux/dev/vda2 1026048 210741247 104857600 8e Linux LVMCommand (m for help): nCommand action e extended p primary partition (1-4)pPartition number (1-4): 3First sector (210741248-312499999, default 210741248): Using default value 210741248Last sector, +sectors or +size{K,M,G} (210741248-312499999, default 312499999): +5GCommand (m for help): t Partition number (1-4): 3Hex code (type L to list codes): 8eChanged system type of partition 3 to 8e (Linux LVM)Command (m for help): pDisk /dev/vda: 160.0 GB, 160000000000 bytes255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x000b0430 Device Boot Start End Blocks Id System/dev/vda1 * 2048 1026047 512000 83 Linux/dev/vda2 1026048 210741247 104857600 8e Linux LVM/dev/vda3 210741248 221227007 5242880 8e Linux LVMCommand (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.The kernel still uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks. - 加入新分割區的 mapping。
0 m6 M, x; S1 q4 T9 D- X! Y! U[root@deyu ~(keystone_myuser)]# partx -va /dev/vdadevice /dev/vda: start 0 size 312500000gpt: 0 slicesdos: 4 slices# 1: 2048- 1026047 ( 1024000 sectors, 524 MB)# 2: 1026048-210741247 (209715200 sectors, 107374 MB)# 3: 210741248-221227007 ( 10485760 sectors, 5368 MB)# 4: 0- -1 ( 0 sectors, 0 MB)BLKPG: Device or resource busyerror adding partition 1BLKPG: Device or resource busyerror adding partition 2BLKPG: Device or resource busyerror adding partition 3 - 建立 pv。 1 ], u6 `4 C! o
[root@deyu ~(keystone_myuser)]# pvcreate /dev/vda3 Physical volume "/dev/vda3" successfully created - 建立 vg cinder-volumes。
. _# p# h* m* |! R ?[root@deyu ~(keystone_myuser)]# vgcreate -s 32M cinder-volumes /dev/vda3 Volume group "cinder-volumes" successfully created - 刪除紀錄檔,再重新啟動 openstack-cinder-scheduler, openstack-cinder-api 及 openstack-cinder-volume 服務。 6 q+ [1 \% l1 q# m0 v
[root@kvm ~(keystone_admin)]# rm -f /var/log/cinder/*[root@kvm ~(keystone_admin)]# /etc/init.d/openstack-cinder-scheduler restartStopping openstack-cinder-scheduler: [ OK ]Starting openstack-cinder-scheduler: [ OK ][root@kvm ~(keystone_admin)]# /etc/init.d/openstack-cinder-api restartStopping openstack-cinder-api: [ OK ]Starting openstack-cinder-api: [ OK ][root@kvm ~(keystone_admin)]# /etc/init.d/openstack-cinder-volume restartStopping openstack-cinder-volume: [FAILED]Starting openstack-cinder-volume: [ OK ] - 再查看 cinder 服務的紀錄,已無錯誤訊息。
# g4 c. d' z1 G" @ t[root@kvm ~(keystone_admin)]# tail /var/log/cinder/*==> /var/log/cinder/api.log <====> /var/log/cinder/scheduler.log <==2014-01-25 06:07:01 CRITICAL [cinder] need more than 0 values to unpack==> /var/log/cinder/volume.log <==
. v* n) b4 Y3 D6 \7 I
9 f. ^1 T. G( f |
|