[Drbd-dev] lock for reading device state

Lars Ellenberg Lars.Ellenberg at linbit.com
Thu Dec 7 14:09:20 CET 2006


/ 2006-12-06 17:22:43 +0000
\ Cristian Zamfir:
> 
> 
> Hi,
> 
> I am using drbd to implement xen block device migration.  Right now I
> am parsing /proc/drbd to find out if the drives are synchronized and I
> can migrate them.

you talk about drbd state "Connected, Consistent",
or what exactly are you parsing?

> Is there a way to obtain a lock while reading and processing this
> information and prevent other writes to the primary device?

no. why?

> I need to be able to prevent writes while reading the state of
> the device from a script external to drbd.

does not make sense to me yet?

> In case there is no existing solution, can you please give me a few
> tips on how to start developing such a locking mechanism?

please give more details about your assumptions and reasoning,
maybe its just that you have wrong expectations?

could also be that I'm just mentally block right now...

	:)

-- 
: Lars Ellenberg                            Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH      Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe    http://www.linbit.com :


More information about the drbd-dev mailing list