Thanks for the tip, Rob.
On 05/10/17 07:49, Roberto Resoli wrote:
Il 04/10/2017 12:37, Martyn Spencer ha scritto:
Hi Jay,
Thank you for your very detailed notes - they are very helpful. Out of
interest, is using cat /proc/drbd still useful with drbd 9? Would
watching drbdsetup status be the preferred equivalent now?
You can use this for "old-style" monitoring of drbd9 connections to
${node_name}, related to ${resource_name}:
cat
/sys/kernel/debug/drbd/resources/${resource_name}/connections/${node_name}/0/proc_drbd
Personally, I use this simple script (watch-ing it) for monitoring
connections to other nodes (in a three nodes cluster):
===== proc_drbd.sh =====
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 <resource>"
exit 1
fi
resource_name=$1
for i in {1..3}; do
node_name="pve${i}"
[ "$node_name" != "$HOSTNAME" ] && \
echo -n "$node_name: " && cat
/sys/kernel/debug/drbd/resources/${resource_name}/connections/${node_name}/0/proc_drbd
|| \
echo "$node_name: *this node*"
done
=========
Anyway, the recommended "modern" way is
watch -c drbdsetup status vm-100-disk-2 --color=always --verbose
--statistics
-c and --color=always preserves colors
--verbose --statistics are useful exposing more detailed status (such as
out of sync blocks)
rob
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user
_______________________________________________
drbd-user mailing list
[email protected]
http://lists.linbit.com/mailman/listinfo/drbd-user