Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Thu, Jan 10, 2008 at 01:13:42PM +0100, Tomasz Chmielewski wrote: > Tomasz Chmielewski schrieb: > >It seems to me that for some reason it's not possible to create a > >physical volume on a DRBD device (at least on my machine, that is). > > > >Below, we can see that running "pvcreate" succeeds and than fails, then > >it succeeds again etc.: > > > ># pvcreate -d -v /dev/drbd0 > > Set up physical volume for "/dev/drbd0" with 976544952 available > >sectors > > Zeroing start of device /dev/drbd0 > > Physical volume "/dev/drbd0" successfully created there, "Physical volume "/dev/drbd0" successfully created". so, what gives? > ># pvcreate -d -v /dev/drbd0 > > Wiping cache of LVM-capable devices > > Set up physical volume for "/dev/drbd0" with 976544952 available > >sectors > > Zeroing start of device /dev/drbd0 > > Failed to write physical volume "/dev/drbd0" why would you want to recreate a pv on a pv you just now successfully created? > > Looks like LVM doesn't like unpartitioned DRBD devices? > > I added a partition to /dev/drbd0 with fdisk. > > Then, I added a drive mapping with kpartx. > > It works fine now. > > # kpartx -a -v /dev/drbd0 > add map drbd0p1 : 0 976543092 linear /dev/drbd0 63 > > # pvcreate -d -v /dev/mapper/drbd0p1 > Set up physical volume for "/dev/mapper/drbd0p1" with 976542708 > available sectors > Zeroing start of device /dev/mapper/drbd0p1 > Physical volume "/dev/mapper/drbd0p1" successfully created > > > Anyway, why does it fail if I want to set up LVM on raw DRBD device? A > bug or a feature? works for me. we do have several "lvm on top of drbd" (or, drbd as pv for lvm) in production. and we for sure don't "partition" them first, that would be nonsense. so neither drbd nor lvm is the problem here. check your lvm configuration. try adding -vvvv (and, if you want to, -dddd) to your pvcreate commandline, the output, should give you a hint what actually goes on, and that should be enough to find out what you are doing wrong. -- : Lars Ellenberg http://www.linbit.com : : DRBD/HA support and consulting sales at linbit.com : : LINBIT Information Technologies GmbH Tel +43-1-8178292-0 : : Vivenotgasse 48, A-1120 Vienna/Europe Fax +43-1-8178292-82 : __ please use the "List-Reply" function of your email client.