Am Montag, den 02.11.2015, 17:14 +0100 schrieb Lars Ellenberg:
> res=XYZ
> if drbdsetup show $res | grep -q allow-two-primaries; then
>       echo "Two primaries are allowed."
> else
>       echo "Two primaries are not allowed."
> fi
> 
> complicated to parse?
> where?

Well, for safety reasons I thought about something more sophisticated, a
parser that understands the structure of drbdsetup's configuration data
output and converts sections and attributes to a neat data structure
that can be addressed directly.
I will use the data captured for other things to, in this case (live
migration) to determine the protocol before setting it to C, to be able
re-set it after migration to its previous value. E.g. in case some VMs
might use protocol B in the future, so after live migration I will set
it back to B without having to call drbdadm adjust.

Best regards,
// Veit

_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to