drdb.conf 605 B

1234567
  1. UserParameter=drbd.discover, drbdsetup status|sed -r -n 's/^resource([0-9]+)\s+role:.*/\1/p' | sort -n | awk 'BEGIN{printf "{\"data\":["}; /.*/ {printf c"{\"{#DRBDNAME}\":\""$1"\"}";c=","}; END{print "]}"}'
  2. UserParameter=drbd.cstate[*], drbdsetup cstate $1
  3. UserParameter=drbd.dstate.local[*], drbdsetup dstate $1 | cut -f1 -d/
  4. UserParameter=drbd.dstate.remote[*], drbdsetup dstate $1 | cut -f2 -d/
  5. UserParameter=drbd.role.local[*], drbdsetup role $1 | cut -f1 -d/
  6. UserParameter=drbd.role.remote[*], drbdsetup role $1 | cut -f2 -d/
  7. UserParameter=drbd.version, sed -r -n 's/^version: (.*)$/\1/p' /proc/drbd