Debian Squeeze Ganeti-lvm.conf 过滤器问题

Debian Squeeze Ganeti-lvm.conf 过滤器问题

我一直在集成 ganeti 项目,但它在 PV(物理卷)名称处存在“:”字符问题。通过filter = [ "r|:|", "a|.*|"]/etc/lvm.conf,创建PV的时候,写得没错,但是创建VG的时候,又出现了错误,如下:/dev/block/104:17

root@node2:~# pvdisplay
  "/dev/cciss/c0d1p1" is a new physical volume of "33.91 GiB"
  --- NEW Physical volume ---
  PV Name               /dev/cciss/c0d1p1
  VG Name
  PV Size               33.91 GiB
  Allocatable           NO
  PE Size               0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               piPcN8-SwXe-gd57-sXFf-KSvF-tk0p-OXias7

当创建 VG(vgcreate xenvg /dev/cciss/c0d1p1)时,输出变成:/dev/block/104:17,这不是我一直在使用的应用程序(ganeti)的功能输出。

root@node2:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/block/104:17
  VG Name               xenvg
  PV Size               33.91 GiB / not usable 3.80 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              8681
  Free PE               8681
  Allocated PE          0
  PV UUID               piPcN8-SwXe-gd57-sXFf-KSvF-tk0p-OXias7

PS 在 lvm.conf 中只添加了 (filter = [ "r|:|", "a|.*|"]),没有添加 (preferred_names) 行。我的错误在哪里,请解释一下。

完整故事: http://code.google.com/p/ganeti/issues/detail?id=93

弗拉基米尔

答案1

通过阅读大量文档,我终于解决了这个问题。关键是:

首选名称 = [ “^/dev/dm-*/”, “^/dev/cciss/” ]

root@mainframe1:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/cciss/c0d1p1
  VG Name               xenvg
  PV Size               33.91 GiB / not usable 3.80 MiB
  Allocatable           yes
  PE Size               4.00 MiB
  Total PE              8681
  Free PE               8681
  Allocated PE          0
  PV UUID               wtjoOE-dGpv-xoVK-pKa1-Bra4-dvRr-PSoO7o

正如你输出的/dev/block/104:17已经消失了。

总之,在/etc/lvm/lvm.conf

preferred_names = [ "^/dev/dm-*/" , "^/dev/cciss/" ]

filter = [ "r|:|", "a|.*|"]

弗拉基米尔

相关内容