OpenNebula LVM数据存储使用场景问题

OpenNebula LVM数据存储使用场景问题

我尝试在由两台主机组成的测试环境中配置 OpenNebula:

  • 星云(前机)带日光石
  • kvm-节点-1已配置 VG 的主机

星云机器包含以下内容:

root@nebula:/var/lib/one/datastores# onedatastore list
      ID NAME                SIZE AVAIL CLUSTERS     IMAGES TYPE DS      TM      STAT
       0 system                 - -     0                 0 sys  -       ssh     on  
       1 default            39.1G 70%   0                 4 img  fs      ssh     on  
       2 files              39.1G 70%   0                 0 fil  fs      ssh     on  
     100 images_shared      39.1G 70%   0                 2 img  fs      shared  on  
     104 lvm_system         39.1G 76%   0                 0 sys  -       fs_lvm  on  
     105 lvm_images         39.1G 70%   0                 1 img  fs      fs_lvm  on  
     106 lvm_system2        39.1G 76%   0                 0 sys  -       fs_lvm  on
root@nebula:/var/lib/one/datastores# ls /var/lib/one/datastores/
0  1  100  101  105  2
root@nebula:/var/lib/one/datastores# showmount -e
Export list for nebula:
/var/lib/one/datastores/105 192.168.122.0/24
/var/lib/one/datastores/100 192.168.122.0/24

kvm-节点-1机器包含以下内容:

root@kvm-node-1:/var/lib/one/datastores# ls /var/lib/one/datastores/
0  100  104  105  106
root@kvm-node-1:/var/lib/one/datastores# mount|grep nfs
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
192.168.122.240:/var/lib/one/datastores/100 on /var/lib/one/datastores/100 type nfs4 (rw,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.74,local_lock=none,addr=192.168.122.240)
192.168.122.240:/var/lib/one/datastores/105 on /var/lib/one/datastores/105 type nfs4 (rw,relatime,vers=4.2,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.74,local_lock=none,addr=192.168.122.240)
root@kvm-node-1:/var/lib/one/datastores# vgs
  VG       #PV #LV #SN Attr   VSize   VFree 
  vg-one-0   1   1   0 wz--n- <10,00g <9,98g

我可以通过 Sunstone 将带有映像的虚拟机部署到虚拟机管理程序。此图表示启动成功。但由于错误,我无法终止虚拟机:

Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 Command execution failed (exit code: 5): /var/lib/one/remotes/tm/fs_lvm/delete nebula:/var/lib/one//datastores/0/29/disk.0 29 105
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG E 29 delete: Command "    set -x
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 DEV=$(readlink /var/lib/one/datastores/0/29/disk.0)
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 if [ -d "/var/lib/one/datastores/0/29/disk.0" ]; then
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 rm -rf "/var/lib/one/datastores/0/29/disk.0"
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 else
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 rm -f /var/lib/one/datastores/0/29/disk.0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 if [ -z "$DEV" ]; then
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 exit 0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 fi
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 if echo "$DEV" | grep "^/dev/" &>/dev/null; then
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 sudo lvremove -f $DEV
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 fi
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 fi" failed: ++ readlink /var/lib/one/datastores/0/29/disk.0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + DEV=/dev/vg-one-0/lv-one-29-0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + '[' -d /var/lib/one/datastores/0/29/disk.0 ']'
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + rm -f /var/lib/one/datastores/0/29/disk.0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + '[' -z /dev/vg-one-0/lv-one-29-0 ']'
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + echo /dev/vg-one-0/lv-one-29-0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + grep '^/dev/'
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 + sudo lvremove -f /dev/vg-one-0/lv-one-29-0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 Volume group "vg-one-0" not found
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG I 29 Cannot process volume group vg-one-0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: LOG E 29 Error deleting /var/lib/one/datastores/0/29/disk.0
Fri Nov  9 16:04:55 2018 [Z0][TM][D]: Message received: TRANSFER FAILURE 29 Error deleting /var/lib/one/datastores/0/29/disk.0

我应该如何使用 LVM 数据存储来组织前端机器和管理程序机器之间的交换来解决这个问题?

答案1

这个问题已经被我在OpenNebula论坛解决了。

简而言之:

我已经解决了我的问题,特别是通过删除 id 0 的默认系统数据存储。现在,虚拟机实例正在正确的 VG 中创建(vg-one-104 而不是 vg-one-0)。我不知道这是否是正确的行为(删除默认的系统数据存储),但现在它对我有用。因此,VM 实例也可以正确终止。我将这个主题设置为已解决。

所有主题位于这个链接

相关内容