Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've been integrating the ganeti project and it has a problem with the ":" character at the PV ( physical volume ), name. By adding the line filter = [ "r|:|", "a|.*|"] in /etc/lvm.conf, when creating PV, it is written correct. But when create a VG on it, it's displayed again with the incorect way like : /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

When create VG ( vgcreate xenvg /dev/cciss/c0d1p1 ), the output is becoming : /dev/block/104:17 which is not functional output for the application that I've been using ( 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

P.S It's only added the ( filter = [ "r|:|", "a|.*|"] ), in lvm.conf, without ( preferred_names ) line. Where is my mistake, please to explain.

Complete story: http://code.google.com/p/ganeti/issues/detail?id=93

Kind regards Vladimir

share|improve this question

1 Answer 1

up vote 0 down vote accepted

With a lot of reading in documentations, I've managed to solve the problem. The key was :

preferred_names = [ "^/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

As you the output /dev/block/104:17 has disapeared.

In summary the was adding these lines in /etc/lvm/lvm.conf :

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

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

Kind regards Vladimir

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.