找回密码
 注册
查看: 2417|回复: 0

建立 cinder-volumes group

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-5-23 19:28:01 | 显示全部楼层 |阅读模式
  • 啟動 openstack-cinder-volume 服務,應該會自動產生 cinder-volumes 的 vg。
    9 p' w6 }, R* f. @, _8 p( s[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 不存在,必須自行產生。 ! Q) f5 t0 k7 l% ]
    [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。
    4 O4 W& R: G4 @- c/ G6 z" R! L[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。
    ( F2 {. C5 a- f4 j! ?[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。 2 n1 I& p4 x2 c+ K2 [
    [root@deyu ~(keystone_myuser)]# pvcreate /dev/vda3  Physical volume "/dev/vda3" successfully created
  • 建立 vg cinder-volumes。
    ! B& L7 @7 \/ s% z+ F, d[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 服務。
    1 Y4 _1 }2 g: _+ [* J[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 服務的紀錄,已無錯誤訊息。   w0 f8 G, v+ M9 f; Q. k5 d/ o5 i& u4 Q
    [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 <==
    , X  p0 k- q# \0 b& @& N0 l& i

2 [' R- U: Z# @4 F: R- N2 A
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 02:05 , Processed in 0.017046 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表