linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Configure lvm2 with drbd
@ 2007-04-24 10:24 Mariano Gonzalvo
  2007-04-24 10:31 ` Patrick Caulfield
  2007-04-24 10:40 ` Bryn M. Reeves
  0 siblings, 2 replies; 4+ messages in thread
From: Mariano Gonzalvo @ 2007-04-24 10:24 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 839 bytes --]

Hi,

    I'm trying to configure lvm2 on top of drbd. I've configured drbd 
(/dev/drbd0 and /dev/drbd1) and put them as primary node, but when I try 
to create a physical volume this is what it does happens

       pvcreate /dev/drbd0
          Physical volume "/dev/drbd0" successfully created
       pvdisplay
            --- NEW Physical volume ---
          PV Name               /dev/md4
          VG Name
          PV Size               129,45 GB
          Allocatable           NO
          PE Size (KByte)       0
          Total PE              0
          Free PE               0
          Allocated PE          0
          PV UUID               MtxjHy-8zfW-i9nq-TJA4-b6F9-jtcW-FkanLB

    /dev/md4 is the raid device over was configured drbd0.

    Why /dev/md4 it's taken as PV Name?

Thanks in advance

Best regards

Mariano


[-- Attachment #2: Type: text/html, Size: 2194 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Configure lvm2 with drbd
  2007-04-24 10:24 [linux-lvm] Configure lvm2 with drbd Mariano Gonzalvo
@ 2007-04-24 10:31 ` Patrick Caulfield
  2007-04-24 10:45   ` Mariano Gonzalvo
  2007-04-24 10:40 ` Bryn M. Reeves
  1 sibling, 1 reply; 4+ messages in thread
From: Patrick Caulfield @ 2007-04-24 10:31 UTC (permalink / raw)
  To: LVM general discussion and development

Mariano Gonzalvo wrote:
> Hi,
> 
>     I'm trying to configure lvm2 on top of drbd. I've configured drbd
> (/dev/drbd0 and /dev/drbd1) and put them as primary node, but when I try
> to create a physical volume this is what it does happens
> 
>        pvcreate /dev/drbd0
>           Physical volume "/dev/drbd0" successfully created
>        pvdisplay
>             --- NEW Physical volume ---
>           PV Name               /dev/md4
>           VG Name
>           PV Size               129,45 GB
>           Allocatable           NO
>           PE Size (KByte)       0
>           Total PE              0
>           Free PE               0
>           Allocated PE          0
>           PV UUID               MtxjHy-8zfW-i9nq-TJA4-b6F9-jtcW-FkanLB
> 
>     /dev/md4 is the raid device over was configured drbd0.
> 
>     Why /dev/md4 it's taken as PV Name?
> 

It's trying to be helpful! Normally people build MD devices out of other devices
and so LVM uses the MD in preference to other devices it finds with the same UUID.

You'll need to exclude the MD device in the /etc/lvm/lvm.conf filters entry.
something like:

filter =[ "r/md4/" ]


-- 
Patrick

Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street,
Windsor, Berkshire, SL4 ITE, UK.
Registered in England and Wales under Company Registration No. 3798903

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Configure lvm2 with drbd
  2007-04-24 10:24 [linux-lvm] Configure lvm2 with drbd Mariano Gonzalvo
  2007-04-24 10:31 ` Patrick Caulfield
@ 2007-04-24 10:40 ` Bryn M. Reeves
  1 sibling, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2007-04-24 10:40 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mariano Gonzalvo wrote:
> 
>     /dev/md4 is the raid device over was configured drbd0.
> 
>     Why /dev/md4 it's taken as PV Name?
> 

Hi Mariano,

LVM2 identifies devices using labels written on the disks. So, if md4 is
the underlying device for your drbd devices, when lvm2 scans /dev
looking for labels it finds the label on md4 first and uses that.

You can control this using lvm2's filtering options.

See the man page for lvm.conf for the full details, but editing
/etc/lvm/lvm.conf and changing the filter line from:

        filter = [ "a/.*/" ]

to:

        filter = [ "a|/dev/drdb|", "r|/dev/md|", "a|.*|" ]

Should accept all drdb devices as physical volumes, reject any software
raid (md) devices, and accept everything else.

This should work if you only have PVs on drdb or other device types and
not on any plain md devices. If you have a mix of the types you will
need to create a more specific filter line for your system.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGLd6M6YSQoMYUY94RAtI8AKDFS6jYQQ4869RQQKy/qMYZEdjiagCfaKGP
te2AMpkzZ45lDQTMwXmyTgE=
=nRwl
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-lvm] Configure lvm2 with drbd
  2007-04-24 10:31 ` Patrick Caulfield
@ 2007-04-24 10:45   ` Mariano Gonzalvo
  0 siblings, 0 replies; 4+ messages in thread
From: Mariano Gonzalvo @ 2007-04-24 10:45 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 1265 bytes --]

Thanks so much! now it does work ok.

Best regards

Mariano
> Mariano Gonzalvo wrote:
>   
>> Hi,
>>
>>     I'm trying to configure lvm2 on top of drbd. I've configured drbd
>> (/dev/drbd0 and /dev/drbd1) and put them as primary node, but when I try
>> to create a physical volume this is what it does happens
>>
>>        pvcreate /dev/drbd0
>>           Physical volume "/dev/drbd0" successfully created
>>        pvdisplay
>>             --- NEW Physical volume ---
>>           PV Name               /dev/md4
>>           VG Name
>>           PV Size               129,45 GB
>>           Allocatable           NO
>>           PE Size (KByte)       0
>>           Total PE              0
>>           Free PE               0
>>           Allocated PE          0
>>           PV UUID               MtxjHy-8zfW-i9nq-TJA4-b6F9-jtcW-FkanLB
>>
>>     /dev/md4 is the raid device over was configured drbd0.
>>
>>     Why /dev/md4 it's taken as PV Name?
>>
>>     
>
> It's trying to be helpful! Normally people build MD devices out of other devices
> and so LVM uses the MD in preference to other devices it finds with the same UUID.
>
> You'll need to exclude the MD device in the /etc/lvm/lvm.conf filters entry.
> something like:
>
> filter =[ "r/md4/" ]
>
>
>   


[-- Attachment #2: Type: text/html, Size: 1606 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-24 10:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-24 10:24 [linux-lvm] Configure lvm2 with drbd Mariano Gonzalvo
2007-04-24 10:31 ` Patrick Caulfield
2007-04-24 10:45   ` Mariano Gonzalvo
2007-04-24 10:40 ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).