[DRBD-user] Syncing new disk w/ existing node

Luis Garrido luisgarrido at users.sourceforge.net
Sun Sep 21 22:27:14 CEST 2008

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


On Sun, Sep 21, 2008 at 10:23 PM, Luis Garrido
<luisgarrido at users.sourceforge.net> wrote:
>> Also, is there a nice way to get relationship between resource name and DRBD
>> device number? It'd be nice if that was listed in /proc/drbd.
>>
>
> drbdadm dump $RESOURCE | grep -o -m 1 '/dev/drbd[0-9]*'
>

And the following one-liner will give you the maximum device number in
use, handy for automating the addition of new resources:

drbdadm dump | awk
'BEGIN{max=-1}/\/dev\/drbd/{n=substr($2,10,length($2)-10);if (n>max)
max=n;}END{print max}'



More information about the drbd-user mailing list