Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DRBD: Users

LVM PV on drbd block device

 

 

DRBD users RSS feed   Index | Next | Previous | View Threaded


pushakk at limbo

Nov 12, 2009, 1:34 AM

Post #1 of 9 (1476 views)
Permalink
LVM PV on drbd block device

Hello everyone, the first sorry about my poor english.

I have configured an drbd8 cluster with two nodes so I have got a
/dev/drbd1 device in both nodes. Later I sync the nodes with "drbdadm --
--overwrite-data-of-peer primary" and the last I did "pvcreate /dev/drbd1"
on primary node.

When I do pvdisplay in the primary node I get

xenstore1:/etc/iet# pvscan
PV /dev/drbd1 VG store lvm2 [931,49 GB / 921,49 GB free]
Total: 1 [931,49 GB] / in use: 1 [931,49 GB] / in no VG: 0 [0 ]

so that's Ok, but in the secondary node I get

xenstore2:~# pvscan -d
PV /dev/md0 VG store lvm2 [931,49 GB / 921,49 GB free]
Total: 1 [931,49 GB] / in use: 1 [931,49 GB] / in no VG: 0 [0 ]

and only this, pvscan does not detect /dev/drbd1 like a PV device. If I
configure LVM filter with
filter = [ "a|drbd.*|", "r|.*|" ] pvscan show notihng.

The drbd cluster is syncing yet but I did pvcreate after the syncing so I
supossed that the LVM metadata would be writen In both nodes.

Is this a issue? When the sync finish I will see /dev/drbd1 like a pv
device in secondary node?

Thanks very much.

_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


morbus2000 at web

Nov 12, 2009, 7:49 AM

Post #2 of 9 (1407 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

> -----Ursprüngliche Nachricht-----
> Von: "Juan Antonio" <pushakk [at] limbo>
> Gesendet: 12.11.09 15:34:51
> An: "Lista drbd" <drbd-user [at] lists>
> Betreff: [DRBD-user] LVM PV on drbd block device


> Hello everyone, the first sorry about my poor english.
>
> I have configured an drbd8 cluster with two nodes so I have got a
> /dev/drbd1 device in both nodes. Later I sync the nodes with "drbdadm --
> --overwrite-data-of-peer primary" and the last I did "pvcreate /dev/drbd1"
> on primary node.
>
> When I do pvdisplay in the primary node I get
>
> xenstore1:/etc/iet# pvscan
> PV /dev/drbd1 VG store lvm2 [931,49 GB / 921,49 GB free]
> Total: 1 [931,49 GB] / in use: 1 [931,49 GB] / in no VG: 0 [0 ]
>
> so that's Ok, but in the secondary node I get
>
> xenstore2:~# pvscan -d
> PV /dev/md0 VG store lvm2 [931,49 GB / 921,49 GB free]
> Total: 1 [931,49 GB] / in use: 1 [931,49 GB] / in no VG: 0 [0 ]
>
> and only this, pvscan does not detect /dev/drbd1 like a PV device. If I
> configure LVM filter with
> filter = [ "a|drbd.*|", "r|.*|" ] pvscan show notihng.
>
> The drbd cluster is syncing yet but I did pvcreate after the syncing so I
> supossed that the LVM metadata would be writen In both nodes.
>
> Is this a issue? When the sync finish I will see /dev/drbd1 like a pv
> device in secondary node?
>
> Thanks very much.
>
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user
>

hi,

the VG and LV doesn´t contain "drbd" example vgdrbd or lvdrbd
we configure lvm.conf
filter = [ "a|sd.*|", "a|drbd.*|", "r|.*|" ]
This filter expression accepts PV signatures found on any SCSI and DRBD devices, while rejecting (ignoring) all others.

on both nodes
# pvcreate /dev/sdx
# pvscan -v
# vgcreate vgtest /dev/sdx
# vgscan

# lvcreate --name lvtest -l xxxxxx vgtest
# lvdisplay

create drbd device and Initial device synchronization primary / secondary

initial drbd device as physical volume
# pvcreate -ddd -vvv /dev/drbdx
# pvscan -v (shows PV /dev/drbdx)

on one node create VG on drbd device
# vgcreate -ddd -vvv vgontop /dev/drbdx
# vgscan -v
# lvcreate --name lvontop --size xxTB vgontop
# lvdisplay
> lv only on one node

on this node
# vgchange -a n vgontop
# drbdadm secondary drbdx

on the other node
# drbdadm primary drbdx
# vgchange -a y vgontop

--> now, lv on top of drbd to be available on both nodes

Regards
Andreas





_____________________________________________________________
DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für
16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/

_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


gianluca.cecchi at gmail

Nov 12, 2009, 8:24 AM

Post #3 of 9 (1420 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

On Thu, Nov 12, 2009 at 4:49 PM, hans morbus2000 <morbus2000 [at] web> wrote:

> [snip]
>
> > Hello everyone, the first sorry about my poor english.
> >
> > I have configured an drbd8 cluster with two nodes so I have got a
> > /dev/drbd1 device in both nodes. Later I sync the nodes with "drbdadm --
> > --overwrite-data-of-peer primary" and the last I did "pvcreate
> /dev/drbd1"
> > on primary node.
> >
> [snip]
> on this node
> # vgchange -a n vgontop
> # drbdadm secondary drbdx
>
> on the other node
> # drbdadm primary drbdx
> # vgchange -a y vgontop
>
> --> now, lv on top of drbd to be available on both nodes
>
> Regards
> Andreas
>
>
>
For Juan Antonio:
which kind of cluster?
which kind of Linux distribution/release?
which kind of usage then of the LVs/FS to be created?

For Andreas:
this is ok for initialization.
But then you have the same problems when you have to create LVs.
You need to de-activate VG on one node, demote drbd role, and activate on
the other... because LVM itslef is not cluster aware.

Preferable, but depending also on the OS kind and licensing, to use drbd in
dual primary mode AND Cluster LVM (with CLVMD that depends on cman and
cluster-storage channel if using Red Hat, so with economical impact....)

Gianluca


pushakk at limbo

Nov 12, 2009, 11:59 AM

Post #4 of 9 (1421 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

Hello and thank you very much to yours Gianluca and Andreas.

which kind of cluster?
Only Primary - Secondary drbd cluster.

which kind of Linux distribution/release?
Debian lenny in both nodes.

which kind of usage then of the LVs/FS to be created?
LVs will be iscsi targets for a xen server.

I believe clvm will be useful.

Again, thank you very much Gianluca.

Gianluca Cecchi escribió:
> On Thu, Nov 12, 2009 at 4:49 PM, hans morbus2000 <morbus2000 [at] web
> <mailto:morbus2000 [at] web>> wrote:
>
> [snip]
>
> > Hello everyone, the first sorry about my poor english.
> >
> > I have configured an drbd8 cluster with two nodes so I have got a
> > /dev/drbd1 device in both nodes. Later I sync the nodes with
> "drbdadm --
> > --overwrite-data-of-peer primary" and the last I did "pvcreate
> /dev/drbd1"
> > on primary node.
> >
> [snip]
> on this node
> # vgchange -a n vgontop
> # drbdadm secondary drbdx
>
> on the other node
> # drbdadm primary drbdx
> # vgchange -a y vgontop
>
> --> now, lv on top of drbd to be available on both nodes
>
> Regards
> Andreas
>
>
>
> For Juan Antonio:
> which kind of cluster?
> which kind of Linux distribution/release?
> which kind of usage then of the LVs/FS to be created?
>
> For Andreas:
> this is ok for initialization.
> But then you have the same problems when you have to create LVs.
> You need to de-activate VG on one node, demote drbd role, and activate
> on the other... because LVM itslef is not cluster aware.
>
> Preferable, but depending also on the OS kind and licensing, to use
> drbd in dual primary mode AND Cluster LVM (with CLVMD that depends on
> cman and cluster-storage channel if using Red Hat, so with economical
> impact....)
>
> Gianluca
> ------------------------------------------------------------------------
>
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user
>


morbus2000 at web

Nov 13, 2009, 1:32 AM

Post #5 of 9 (1399 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

> -----Ursprüngliche Nachricht-----
> Von: "Juan Antonio Rodriguez" <pushakk [at] limbo>
> Gesendet: 12.11.09 20:58:47
> An: Gianluca Cecchi <gianluca.cecchi [at] gmail>
> CC: drbd-user [at] lists
> Betreff: Re: [DRBD-user] LVM PV on drbd block device

Hello and thank you very much to yours Gianluca and Andreas.
>
> which kind of cluster?
> Only Primary - Secondary drbd cluster.
>
> which kind of Linux distribution/release?
> Debian lenny in both nodes.
>
> which kind of usage then of the LVs/FS to be created?
> LVs will be iscsi targets for a xen server.
>
> I believe clvm will be useful.
>
> Again, thank you very much Gianluca.
>
> Gianluca Cecchi escribió:
> On Thu, Nov 12, 2009 at 4:49 PM, hans morbus2000 <morbus2000 [at] web>
> wrote:
> [snip]
>
> > Hello everyone, the first sorry about my poor english.
> >
> > I have configured an drbd8 cluster with two nodes so I have got a
> > /dev/drbd1 device in both nodes. Later I sync the nodes with "
> drbdadm --
> > --overwrite-data-of-peer primary" and the last I did "pvcreate /dev/
> drbd1"
> > on primary node.
> >
> [snip]
> on this node
> # vgchange -a n vgontop
> # drbdadm secondary drbdx
>
> on the other node
> # drbdadm primary drbdx
> # vgchange -a y vgontop
>
> --> now, lv on top of drbd to be available on both nodes
>
> Regards
> Andreas
>
> For Juan Antonio:
> which kind of cluster?
> which kind of Linux distribution/release?
> which kind of usage then of the LVs/FS to be created?
>
> For Andreas:
> this is ok for initialization.
> But then you have the same problems when you have to create LVs.
> You need to de-activate VG on one node, demote drbd role, and
> activate on the other... because LVM itslef is not cluster aware.
>
> Preferable, but depending also on the OS kind and licensing, to use
> drbd in dual primary mode AND Cluster LVM (with CLVMD that depends on
> cman and cluster-storage channel if using Red Hat, so with economical
> impact....)
>
> Gianluca
> _______________________________________________ drbd-user mailing
> listdrbd-user [at] listshttp://lists.linbit.com/mailman/
> listinfo/drbd-user
>
>

hi,
I use two nodes with SLES10 SP2 full pached
DRBD 8.2.6 primary / primary on it
we use an OCFS2 on LV on top of DRBD for XEN DomU´s

for Gianluca
you are right, when I create an other LV on top of DRBD,
I need de-activate VG on the first node an activate on the other node.
after that I can change to primary / primary mode.

Regards
Andreas


_____________________________________________________________
DSL-Preisknaller: DSL-Komplettpakete von WEB.DE schon für
16,99 Euro/mtl.!* Hier klicken: http://produkte.web.de/go/02/

_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


pushakk at limbo

Nov 13, 2009, 7:59 AM

Post #6 of 9 (1387 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

Hi again,

Why the drbd documentation do not reference this issue in the "Configuring
a DRBD resource as a Physical Volume" section?

If I leave the actual configuration like this,

Primary node - PV -> /dev/drbd1 -> /dev/md0
Secondary node - PV -> /dev/md0 (syncronized from /dev/drbd1 on
primary node) with /dev/drbd1 seemingly empty.

What if the primary node is down? I know I can see the LVs data from the
md0 device, and serve the LVs by ISCSI, but will I be able to promote the
secondary node to primary? And could I sync a new node from it in a
permanet failure from the former primary node?

I hope to have explained correctly.

Thank you very much.
Regards.

> the other

> On Thu, Nov 12, 2009 at 4:49 PM, hans morbus2000 <morbus2000 [at] web>
> wrote:
>
>> [snip]
>>
>> > Hello everyone, the first sorry about my poor english.
>> >
>> > I have configured an drbd8 cluster with two nodes so I have got a
>> > /dev/drbd1 device in both nodes. Later I sync the nodes with "drbdadm
>> --
>> > --overwrite-data-of-peer primary" and the last I did "pvcreate
>> /dev/drbd1"
>> > on primary node.
>> >
>> [snip]
>> on this node
>> # vgchange -a n vgontop
>> # drbdadm secondary drbdx
>>
>> on the other node
>> # drbdadm primary drbdx
>> # vgchange -a y vgontop
>>
>> --> now, lv on top of drbd to be available on both nodes
>>
>> Regards
>> Andreas
>>
>>
>>
> For Juan Antonio:
> which kind of cluster?
> which kind of Linux distribution/release?
> which kind of usage then of the LVs/FS to be created?
>
> For Andreas:
> this is ok for initialization.
> But then you have the same problems when you have to create LVs.
> You need to de-activate VG on one node, demote drbd role, and activate on
> the other... because LVM itslef is not cluster aware.
>
> Preferable, but depending also on the OS kind and licensing, to use drbd
> in
> dual primary mode AND Cluster LVM (with CLVMD that depends on cman and
> cluster-storage channel if using Red Hat, so with economical impact....)
>
> Gianluca
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user
>


_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


florian.haas at linbit

Nov 13, 2009, 10:19 AM

Post #7 of 9 (1387 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

On 11/13/2009 04:59 PM, Juan Antonio wrote:
> Hi again,
>
> Why the drbd documentation do not reference this issue in the "Configuring
> a DRBD resource as a Physical Volume" section?

Because googling for "DRBD LVM" and hitting the LVM page in the user's
guide does not mean you should be skipping the Fundamentals chapter. :)

From http://www.drbd.org/users-guide/s-resource-roles.html:

"A DRBD device in the secondary role receives all updates from the peer
node's device, but otherwise disallows access completely."

In other words, a pvscan on a Secondary device will never return a PV
signature for that device. For LVM's purposes, as long as that DRBD
resource is Secondary, no PV exists there. Make it Primary, rescan, and
as if by magic you'll see your PV sig, and your VG, and once you
activate it, all your PVs.

At this point I'll assume that you have different lvm.conf "filter"
entries on your nodes. Please go back and fix that, and follow the LVM
chapter again (after you've made sure you've understood the
fundamentals). In your current configuration you're probably signing up
for losing data.

Cheers,
Florian
Attachments: signature.asc (0.25 KB)


pushakk at limbo

Nov 13, 2009, 11:32 AM

Post #8 of 9 (1381 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

Hi Florian,

I'm so sorry about my mistake, I'll promise to be more carefully in the
future. Moreover I have already done the necesary tests so I could have
been it before question the list. I'ts only that I am too "slowly? dumb?"
reading and understanding the english language.

Thank you very much.

> On 11/13/2009 04:59 PM, Juan Antonio wrote:
>> Hi again,
>>
>> Why the drbd documentation do not reference this issue in the
>> "Configuring
>> a DRBD resource as a Physical Volume" section?
>
> Because googling for "DRBD LVM" and hitting the LVM page in the user's
> guide does not mean you should be skipping the Fundamentals chapter. :)
>
> From http://www.drbd.org/users-guide/s-resource-roles.html:
>
> "A DRBD device in the secondary role receives all updates from the peer
> node's device, but otherwise disallows access completely."
>
> In other words, a pvscan on a Secondary device will never return a PV
> signature for that device. For LVM's purposes, as long as that DRBD
> resource is Secondary, no PV exists there. Make it Primary, rescan, and
> as if by magic you'll see your PV sig, and your VG, and once you
> activate it, all your PVs.
>
> At this point I'll assume that you have different lvm.conf "filter"
> entries on your nodes. Please go back and fix that, and follow the LVM
> chapter again (after you've made sure you've understood the
> fundamentals). In your current configuration you're probably signing up
> for losing data.
>
> Cheers,
> Florian
>
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user
>


_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user


pushakk at limbo

Nov 13, 2009, 11:37 AM

Post #9 of 9 (1385 views)
Permalink
Re: LVM PV on drbd block device [In reply to]

Excuse me,

"so I could have been it before" -> "so I could have done it before"

Regards.

> Hi Florian,
>
> I'm so sorry about my mistake, I'll promise to be more carefully in the
> future. Moreover I have already done the necesary tests so I could have
> been it before question the list. I'ts only that I am too "slowly? dumb?"
> reading and understanding the english language.
>
> Thank you very much.
>
>> On 11/13/2009 04:59 PM, Juan Antonio wrote:
>>> Hi again,
>>>
>>> Why the drbd documentation do not reference this issue in the
>>> "Configuring
>>> a DRBD resource as a Physical Volume" section?
>>
>> Because googling for "DRBD LVM" and hitting the LVM page in the user's
>> guide does not mean you should be skipping the Fundamentals chapter. :)
>>
>> From http://www.drbd.org/users-guide/s-resource-roles.html:
>>
>> "A DRBD device in the secondary role receives all updates from the peer
>> node's device, but otherwise disallows access completely."
>>
>> In other words, a pvscan on a Secondary device will never return a PV
>> signature for that device. For LVM's purposes, as long as that DRBD
>> resource is Secondary, no PV exists there. Make it Primary, rescan, and
>> as if by magic you'll see your PV sig, and your VG, and once you
>> activate it, all your PVs.
>>
>> At this point I'll assume that you have different lvm.conf "filter"
>> entries on your nodes. Please go back and fix that, and follow the LVM
>> chapter again (after you've made sure you've understood the
>> fundamentals). In your current configuration you're probably signing up
>> for losing data.
>>
>> Cheers,
>> Florian
>>
>> _______________________________________________
>> drbd-user mailing list
>> drbd-user [at] lists
>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>
>
>
> _______________________________________________
> drbd-user mailing list
> drbd-user [at] lists
> http://lists.linbit.com/mailman/listinfo/drbd-user
>


_______________________________________________
drbd-user mailing list
drbd-user [at] lists
http://lists.linbit.com/mailman/listinfo/drbd-user

DRBD users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.