Re: [DRBD-user] Primary/Unknown and Secondary/Unknown

2010-03-07 Thread Reindy
Hi,

Yes, I did it on purposed, because we are running live systems, so we want
to make that when the other server shutdown or hang without no reason, the
other server should take up the job. That's why I want drbd and heartbeat to
work that way. Maybe I will go with upgrading the kernel. Because my
configuration is still the same, I did not change anything and I did double
and even triple check.

On Sun, Mar 7, 2010 at 12:57 AM, Maros Timko  wrote:

> This is very interesting to me. You were happily creating Split-Brains
> with the old system. Now there is something that prevents you against
> it and you want to "fix" that?
> Do you really want to failover on disconnected replication link? What
> is the logic behind?
> If you really need it, try to check for fencing options and messages.
>
> Tino
>
> > I have faced same problem.
> > issue resolved via upgrading kernel from 2.6.16.60-0.54.5(comes with
> sle10sp3 media) to 2.6.16.60-0.59.1
> >
> > --ms
> >
> > - Original Message -
> > From: Reindy [mailto:rei...@gmail.com]
> > To: drbd-user@lists.linbit.com
> > Sent: Fri, 5 Mar 2010 23:33:24 +0800
> > Subject: [DRBD-user] Primary/Unknown and Secondary/Unknown
> >
> > Hi,
> >
> > I got problem with my drbd+heartbeat.. previously it used to work but
> > somehow now.. the situation is..
> > I have 2 servers which is currently running primary/secondary and
> > secondary/primary
> >
> > But, when I plug out the crossover cable, somehow the state become
> > pri/unknown and sec/unknown..
> >
> > last time it used to work as pri/unknown and pri/unknown.. this is to
> make
> > sure that the failover is working fine.. now it is not!
> >
> > Any solution to this guys? really need help on this! Thanks in advance!
> >
> ___
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Reply-To considered ...

2010-03-07 Thread Lars Ellenberg
On Sun, Mar 07, 2010 at 05:43:16PM +0100, Christian Iversen wrote:
> P.S: Have you thought about setting a Reply-To-header? I'm almost
> responding to the auther every time.

"Munging" of that header by mailing list software
has been controversial for ages, and probably will stay that way.

I concur mostly with the views expressed in
http://woozle.org/~neale/papers/reply-to-still-harmful.html

As your MUA of choice seems to be Mozilla,
this may be an entertaining read:
https://bugzilla.mozilla.org/show_bug.cgi?id=45715

Cheers,

Lars
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] local mirror

2010-03-07 Thread Christian Iversen

On 2010-03-04 16:55, Lars Ellenberg wrote:

On Mon, Mar 01, 2010 at 01:16:52PM +0100, Christian Iversen wrote:

On 2010-02-27 18:57, Dawid Marcin Grzesiak wrote:

Hi,

I just wonder if I can use DRBD to asynchronously mirror two block
devices locally.

For example I want to have a primary (dedicated, so quite secure) server
and on the other hand secondary (VPS, so quite insecure).

I want to mirror block devices, but I want to keep it encrypted on VPS,
but not on dedicated server.

Sure I can set encrypted partition up on VPS and share it via DRBD, but
then the encryption key will need to be entered and will be stored in
the RAM on VPS.

Better is to map plain block device from secondary server on the primary
server, setup the encrypted partition there (thus encryption key never
leave the primary server) and then setup data mirroring locally.

I imagine that it is possible with NBD and RAID, but:
1. I'm worrying if NBD network protocol is stable enough.
2. This will be synchronized mirroring.
3. What about resynch? Is it have intelligent algorithm to make it fast
and save bandwidth?

Is it possible with DRBD?


In a sense, yes.

You can set up the VPS to export your block device with iSCSI.

Then use an iSCSI-client on your server, to import your block device
into your local (primary) servers namespace. There, you use
cryptsetup with LUKS to give access to the decrypted block device.

Then just use DRBD between "/dev/localdisk" and
"/dev/decrypted-remote-disk".

This should work fine, albeit probably slowly.

If you don't know iSCSI, it's kind of like NBD but 100 times better :)


Others would put this the other way around.
Probably a matter of preference, requirements and environment.


Well, maybe. I've tried both, and for our uses, iSCSI fit much better.


Also, DRBD is for replication between two nodes,
not for replication between two block devies on the same node.


Agreed :)


So if that is what you are up to, you rather want to
look at sofware raid more closely again.
man mdadm, specifically: bitmap, write-mostly, write-behind ...


Well, true. And I agree it's an odd use case.

There could be some advantages to using local/local DRBD though. Namely, 
it would be very easy to switch to the classic local/remote DRBD, or 
even a crazy remote/remote over double iSCSI. Who knows? I thought it 
sounded like a fun idea to try.



Yes, we are not only about DRBD.
We know some other stuff as well ;-)
Just use the right tool for the job.


Indeed, always useful advise :)

P.S: Have you thought about setting a Reply-To-header? I'm almost 
responding to the auther every time.


--
Med venlig hilsen
Christian Iversen
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] Detection of Logical Volume on nested LVM

2010-03-07 Thread Olivier LAMBERT
Hello,

cLVM doesn't provide snapshots :(

But you say my behaviour is "normal" ? so, why lvcreate/lvremove is
not replicated ? it's not a "block" operation for the bottom layer ?
And if I export a physical volume (and not a LVM one) and then after
on iSCSI volume I do "lvcreate" does it solve the problem ?

Regards,

Olivier
XO Project
http://xen-orchestra.com

On Sat, Mar 6, 2010 at 6:01 PM, Maros Timko  wrote:
>>
>> Message: 1
>> Date: Thu, 4 Mar 2010 17:48:24 +0100
>> From: Olivier LAMBERT 
>> Subject: [DRBD-user] Detection of Logical Volume on nested LVM
>>        replication
>> To: drbd-user@lists.linbit.com
>> Message-ID:
>>        
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hello,
>>
>> I'll try to be clear, but it's really hard to explain..
>> In few words : when I create a Logical Volume on a host attached
>> (iSCSI) to one DRBD server, it doesn't appear on the second host,
>> attached to the other DRBD. But, on existing LV, it works like a charm
>> (all data's are replicated). And more, if I create a LV on "one side",
>> and fill it with data, I saw the replication link with heavy traffic,
>> but always no LV.
>> Now, to understand, here is how it happened with this infrastructure.
>>
>> 1) On both DRBD hosts : Debian GNU/Linux, Dual Primary setup, version:
>> 8.3.7 (api:88/proto:86-91). I choose to configure a resource on a
>> Logical volume of 500Gb (named /dev/vg0/xen). To be clear, two hosts
>> are "DRBD1" & "DRBD2". a cat /proc/drbd gave this :
>>  0: cs:Connected ro:Primary/Primary ds:UpToDate/UpToDate C r
>>    ns:153716 nr:408752 dw:562408 dr:355156 al:179 bm:109 lo:0 pe:0
>> ua:0 ap:0 ep:1 wo:n oos:0
>>
>>
>> 2) This resource is exported with iSCSI. For the example, let's say
>> that CLIENT1 is connected to DRBD1, and CLIENT2 is connected to DRBD2.
>> It's simplifed because in real, it's multiple Xen Dom0's clients with
>> multipath (but we don't care of that here).
>>
>> 3) CLIENT1 see the device as a block device (so far so good, iSCSI
>> works). I choose to use LVM on this block device. I create for example
>> : /dev/vg_xen/mydisk on CLIENT1. I mount it, I put some stuff in there
>> : I saw the replication like working : some traffic. DRBD2 and 1 says
>> it's all OK. If I lvscan on CLIENT1, I can see my brand new volume.
>>
>> 4) CLIENT2, (so, connected on iSCSI with DRBD2), see the block device,
>> the volume group, but NOT the Logical Volume. If I disconnect DRBD2's
>> resource, and reconnect it, and reconnect iSCSI of CLIENT2, wow, I saw
>> the LV !
>>
>> And more : if the LV exists on both side (after disconnect/reconnect
>> the resource), data's are correctly replicated (obviously, I do NOT
>> mount LV on both side, I'm aware of that !). But, if I fill on one
>> side (e.g CLIENT1), dismount it, then mount it on CLIENT2, data are
>> here, without any problem.
>>
>> So, my "theory", is that LVM operations (lvcreate or lvremove) on a
>> volume group, which is on top of iSCSI and LVM replicated device by
>> DRBD, are NOT replicated, UNTIL disconnect/reconnect the ressource. I
>> don't know why, and that's why I ask here to understand what I miss.
>
> Right. Discussed many times here and on Heartbeat/Pacemaker list. Try
> to search with cLVM keyword.
>
>> Additional Informations: If my clients are connected to the SAME DRBD
>> (let's tell DRBD1), if CLIENT1 creates a LV, CLIENT2 is immediatly
>> aware of that (just inactive, not a problem, vgchange and it works).
>> So the "problem" is during the replication.
>>
>> Thanks for your help.
>>
>>
>> Regards,
>>
>>
>> Olivier
>> XO Project
>> http://xen-orchestra.com
>>
> ___
> drbd-user mailing list
> drbd-user@lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
___
drbd-user mailing list
drbd-user@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/drbd-user


Re: [DRBD-user] ]Re: [Scst-devel] vSphere MPIO with scst/drbd in dual primary mode. WAS: Re: R: Re: virt_dev->usn randomly generated!?

2010-03-07 Thread Zhen Xu
I wonder how you can do NV_CACHE battery backed.  The NV_CACHE in SCST is just 
the system memory/page cache.  It is not the cache on the RAID card.  You could 
have UPS hooked to the server running SCST.  However, if the system failed 
(memory, hardware, or just seg fault) and you had to reboot without proper 
shutdown, the page cache will be lost.  It is a very interesting setup that you 
wanted to do.  I am interested if you have much success.

Zhen





From: Matteo Tescione 
To: Zhen Xu 
Cc: Vladislav Bolkhovitin ; scst-de...@lists.sourceforge.net; 
drbd-user ; Matteo Tescione ; 
Brian Jared 
Sent: Sat, March 6, 2010 5:55:26 PM
Subject: ]Re: [Scst-devel] vSphere MPIO with scst/drbd in dual primary mode. 
WAS: Re: R: Re: virt_dev->usn randomly generated!?

As you read in my previous post, targets are running virtual so I didn't care 
the NV_CACHE flag at the moment.
I have realized your kinda of setup from almost 2 years now without any major 
issue. (w/ NV_CACHE BatteryBacked)

The goal of this setup is to use the secondary node as an active node, trying 
to improve at least reads operations. 
As for the writes, i'm aware of the additional latency but I'm thinking that 
drbd can coupe well with some concurrent writes. Maybe someone from the drbd 
lists can clarify this.
Split-brain cases can be very well avoided by the adoption of a serial cable 
and dopd. I recently had frequent kernel panic caused by large commands not 
well handled in scst (fixed few days ago) but no data lost occured in drbd 
primary/secondary configuration even with NV_CACHE exposed.
Obviously I'm going to test with BLOCKIO or FILEIO to see some real numbers. 
Though there are still many things left to clarify/test/stress, before start to 
think to move to production stage.
Thanks
--
matteo


- Messaggio originale -
Da: "Zhen Xu" 
A: "Matteo Tescione" , "Brian Jared" 
Cc: "Vladislav Bolkhovitin" , scst-de...@lists.sourceforge.net, 
"drbd-user" 
Inviato: sabato 6 marzo 2010 23.27.54 (GMT+0100) Europe/Berlin
Oggetto: [SPAM?]Re: [Scst-devel] vSphere MPIO with scst/drbd in dual primary 
mode. WAS: Re: R: Re: virt_dev->usn randomly generated!?




Sounds like that you are MPIO from the vSphere initiator to two different 
target on different host. Those two targets are sync'd with DRBD. I do not 
think it is safe with what you are doing here. The two target hosts have page 
cache/nv_cache that is not sync'd. Potentially, you could have a lot of 
inflight IO in the page cache which have not yet made to the drbd layer. Also, 
how do you deal with split brain situations? With the kind of setup you have, 
you probably will have a hard time to figure out which copy to keep after a 
split brain. 

I was able to setup a redundant SCST cluster with DRBD and Pacemaker with MPIO. 
I had to pick one host as primary and run the second node as secondary. 
Actually, you create a master/slave relationship in Pacemaker and it will 
manage which node will be primary. MPIO is done with multiple ethernet ports on 
both nodes. I had 2 ethernet ports on each node for iSCSI traffic. Again, this 
is managed through Pacemaker and the IP address just float with DRBD primary 
host. I was able to create lot of IO on the initiator and reboot the primary 
host and the initiator side will just pause a few second and continue. I run 
SCST backend in FILEIO mode with NV_CACHE. Running SCST back-end in BLOCKIO 
mode will generate "concurrent write" errors with DRBD. DRBD is expecting all 
IO serialized. The more I think about it, I think running FILEIO mode with 
NV_CACHE is not safe as this will cause corruption due to lost inflight IO in 
the page cache/NV_CACHE. 




From: Matteo Tescione < mat...@rmnet.it > 
To: Brian Jared < bja...@ethosprime.com > 
Cc: Vladislav Bolkhovitin < v...@vlnb.net >; scst-de...@lists.sourceforge.net ; 
drbd-user < drbd-user@lists.linbit.com > 
Sent: Sat, March 6, 2010 1:43:35 PM 
Subject: [Scst-devel] vSphere MPIO with scst/drbd in dual primary mode. WAS: 
Re: R: Re: virt_dev->usn randomly generated!? 

Hi folks, 
after a little bit of experimenting I SUCCESFULLY created an drbd active/active 
cluster with scst/iscsi exported to round-robin vsphere initiator. 

configuration is 2 virtual machines with centos5-64 linux-2.6.33 patched and 
drbd8.3.7. Initiators are vSphere Software iscsi initiator. 
Relevant config in drbd is net section, allow-two-primaries. 
Relevant config in scst.conf is: 

DEVICE rmnet-devel,/dev/drbd0,NV_CACHE,512 

[ASSIGNMENT MailScanner has detected a possible fraud attempt from 
"default_iqn.2010-02.com.sc" claiming to be Default_iqn.2010-02.com 
.scst:RMnet-devel] 
#DEVICE , 
A: "Vladislav Bolkhovitin" < v...@vlnb.net > 
Cc: scst-de...@lists.sourceforge.net 
Inviato: venerdì 5 marzo 2010 19.54.51 (GMT+0100) Europe/Berlin 
Oggetto: [SPAM?]Re: [Scst-devel] R: Re: virt_dev->usn randomly generated!? 

That was the intention...but the scst.conf file on the other machine looks