[DRBD-user] Errors when creating a LVM PV on DRBD

Simon greminn at gmail.com
Tue Jun 20 23:31:10 CEST 2006

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

Hi Luciano

> > This is so i can create lv partitions on server1 and have them
> > automatically mirrored to server2 without changing setup (ie adding
> > each lv to the drdb.conf file).
> You'll have to manually (or in a script) activate/deactivate the lvm
> volumes.

Yes - this is the way we will be using it!

> > In my test environment, I have server1 and server2, both with
> > /dev/sdb1 as the meta data drive and /dev/sdb2 as a Linux LV
> > partition, then both servers have "disk = /dev/sdb2" set in the
> > drbd.conf file. Then try to do the following with the following result
> > (can anyone help me here please?):
> >
> > server1:/# pvcreate /dev/drbd0
> > Physical volume "/dev/drbd0" successfully created
> > server1:/# pvdisplay
> > Found duplicate PV 947ghY5ndShGUC7jE8kUuhq9xEH6nvIB: using /dev/sdb2
> Change the filter directive in /etc/lvm/lvm.conf, to exclude sdb.* or
> just include the devices that you know will be used for lvm.

I have excluded /dev/sdb2 in the lvm.conf file thus: filter = [ "r/dev/sdb2" ]

This is the output from pvcreate and pvdisplay. I feel that i have
left out some vital step somewhere here??:

server1:/etc/lvm# pvcreate /dev/drbd0 -vvv
        Processing: pvcreate /dev/drbd0 -vvv
        O_DIRECT will be used
      Setting global/locking_type to 1
      Setting global/locking_dir to /var/lock/lvm
      File-based locking enabled.
      Locking /var/lock/lvm/P_orphans WB
        /dev/drbd0: Added to device cache
        Opened /dev/drbd0 RO
      /dev/drbd0: size is 1783214 sectors
        WARNING: /dev/drbd0 already opened read-only
        Closed /dev/drbd0
        Opened /dev/drbd0 RW
        /dev/drbd0: block size is 1024 bytes
        Using /dev/drbd0
      /dev/drbd0: No label detected
      /dev/drbd0: size is 1783214 sectors
      metadata/pvmetadatasize not found in config: defaulting to 255
      metadata/pvmetadatacopies not found in config: defaulting to 1
      /dev/drbd0: size is 1783214 sectors
        Wiping /dev/drbd0 at sector 4 length 8 sectors
    Set up physical volume for "/dev/drbd0" with 1782830 available sectors
      Scanning for labels to wipe from /dev/drbd0
    Zeroing start of device /dev/drbd0
        Wiping /dev/drbd0 at sector 0 length 4 sectors
      Writing physical volume data to disk "/dev/drbd0"
        Creating metadata area on /dev/drbd0 at sector 4 size 380 sectors
      /dev/drbd0: Writing label to sector 1
  Physical volume "/dev/drbd0" successfully created
      Unlocking /var/lock/lvm/P_orphans
        Closed /dev/drbd0

And still i have this:

server1:/etc/lvm# pvdisplay -v
    Scanning for physical volume names
  Found duplicate PV X05yXbGIMjfOSb4tLo33dW8AxHUyPdyX: using /dev/sdb2
not /dev/drbd0
  Found duplicate PV X05yXbGIMjfOSb4tLo33dW8AxHUyPdyX: using /dev/sdb2
not /dev/drbd0
  --- NEW Physical volume ---
  PV Name               /dev/drbd0
  VG Name
  PV Size               870.52 MB
  Allocatable           NO
  PE Size (KByte)       0
  Total PE              0
  Free PE               0
  Allocated PE          0
  PV UUID               X05yXb-GIMj-fOSb-4tLo-33dW-8AxH-UyPdyX

Thanks Again,


More information about the drbd-user mailing list