[DRBD-user] Display resource name in /proc/drbd?

Dominik Klein dk at in-telegence.net
Wed Aug 29 14:39:42 CEST 2007

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


Maybe this is useful for you?

Bas van Schaik schrieb:
> Hi all,
> 
> I've got two Xen-servers running drbd-on-LVM-on-MD synchronized DomU's
> and in this setup a resource name is much more relevant than a drbd
> device number. Is there any chance that that information will be shown
> in /proc/drbd somewhere in future drbd versions? Or is it available
> already in 0.8 versions? In that case, I will seriously think of
> upgrading my 0.7 to 0.8 because of that simple "feature".
> 
> Regards,
> 
>   -- Bas
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
> 

drbdstatus ()
{
     NAMES=`grep resource /etc/drbd.conf | cut -d " " -f 2 | tr 
'\\\\\\n' ' '`;
     cat /proc/drbd >/tmp/drbdstatus;
     i=0;
     for NAME in $NAMES;
     do
         sed "s/^\ *$i:/$NAME:/" /tmp/drbdstatus > /tmp/tmpdrbdstatus;
         mv /tmp/tmpdrbdstatus /tmp/drbdstatus;
         let "i++";
     done;
     cat /tmp/drbdstatus;
     rm -f /tmp/drbdstatus
}



More information about the drbd-user mailing list