[DRBD-user] drbdmanage: howto create diskless assignments

Robert Altnoeder robert.altnoeder at linbit.com
Thu Jun 18 16:41:49 CEST 2015

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 06/18/2015 01:21 PM, Dietmar Maurer wrote:

> I have still problems with diskless assignments. I create them
> with:
>
>     ($rc, $res) = $hdl->assign($nodename, $volname, { diskless => 
> 'true' });
>
> which works, but I need to wait until the device is accessible. I 
> currently do
> this with a clumsy hack using 'dd':
>
> [...snip...]
>
> This works, but Philipp told me to do it by querying assignment status.
> So I tried this:
>
> [...snip...]
>
> "cstate:deploy" => "true"
>
> [...snip...]
>
> But it does not work. Seems I get cstate:deploy" => "true", but
> the device is not ready to use?


That might be the case, because the "deploy" flag is set after drbdmanage
configured the device using drbdadm (adjust), but DRBD9's connection
attempt runs asynchronously. Therefore, the client may not yet be
connected to a server.
Another potential problem is that the /dev/... devices are created by udev,
which also runs independently of drbdmanage and/or DRBD9, so the
device may not have been created at the stage where drbdmanage sets
the "deploy" flag.

Currently, no elegant solution (like, for example, waiting for an event 
or signal)
is available to solve this problem.

br,
Robert

[Sent again, I forgot to reply to the mailing list too]




More information about the drbd-user mailing list