<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi all,<br>
    <br>
    I am using LVM for several years but now I face an issue where I
    have no clue how to deal with.<br>
    <br>
    I want to have a VG on top of a drbd device (<span class="st">Distributed
      Replicated Block Device) which should not be an issue according to
      docs: <br>
      <a class="moz-txt-link-freetext" href="https://www.drbd.org/en/doc/users-guide-83/s-lvm-drbd-as-pv">https://www.drbd.org/en/doc/users-guide-83/s-lvm-drbd-as-pv</a><br>
      <br>
      Unfortunately I am always getting "duplicate device" errors as LVM
      recons a pv on /dev/sdb (underlying device for drbd) as well as on
      /dev/drbd0<br>
      <br>
      Now I tried to configure filters to match my setup. But it seems I
      do not understand the filter rules.<br>
      <br>
      I need to enable /dev/sda incl. all partitions. (for root)<br>
      I need to disable /dev/sdb at all as it is the device for drbd!<br>
      I need to enable /dev/drbd0 as the "real" PV.<br>
      I can disable all others.<br>
      <br>
      So I tried:<br>
      filter = [ "r|sdb.*/|","a|drbd0/|","a|.*/|" ]<br>
      <br>
      Which results in the duplicate-issue:<br>
      [root@backuppc ~]# pvcreate /dev/drbd0<br>
        Physical volume "/dev/drbd0" successfully created.<br>
      [root@backuppc ~]# pvscan --cache<br>
        WARNING: PV eEpd0B-VaET-V2mH-9InB-pYab-P5Bp-hjfOhh on /dev/sdb
      was already found on /dev/drbd0.<br>
        WARNING: Disabling lvmetad cache which does not support
      duplicate PVs.<br>
        WARNING: Not using lvmetad because duplicate PVs were found.<br>
      <br>
      <br>
      So anyone having an idea what is wrong with my filter config? As
      the docs are very unclear about the exact syntax I did as well
      some other versions but no one leads to the resul I want to
      have...<br>
      <br>
      So what are correct filter rules?<br>
      <br>
      Greetings<br>
      <br>
      /christian<br>
      <br>
    </span>
  </body>
</html>