51 lines
1018 B
Bash
51 lines
1018 B
Bash
#!/bin/bash
|
|
|
|
set -x
|
|
|
|
COROSYNC_NODE=$(hostname)
|
|
|
|
sed -e "s/@LOCAL_NODE@/$COROSYNC_NODE/" test-corosync-conf > /etc/corosync/corosync.conf
|
|
|
|
modprobe configfs
|
|
mount -t configfs none /sys/kernel/config
|
|
|
|
modprobe dlm
|
|
|
|
ls /sys/kernel/config
|
|
ls /sys/kernel/config/dlm
|
|
|
|
mkdir /var/log/cluster
|
|
|
|
systemctl start corosync
|
|
sleep 2
|
|
corosync-quorumtool
|
|
sleep 2
|
|
|
|
tail -8 /var/log/cluster/corosync.conf
|
|
|
|
mkdir /var/log/dlm_controld
|
|
|
|
dlm_controld --log_debug --debug_logfile --enable_fencing 0 --enable_quorum_lockspace 0 --enable_quorum_fencing 0 --enable_startup_fencing 0
|
|
sleep 2
|
|
|
|
tail -8 /var/log/dlm_controld/dlm_controld.log
|
|
|
|
ls /sys/kernel/config/dlm
|
|
|
|
dlm_tool status
|
|
|
|
gcc dlm_seq_async.c -ldlm -o dlm_seq_async
|
|
gcc dlm_seq_sync.c -ldlm_lt -o dlm_seq_sync
|
|
|
|
./dlm_seq_sync -i 100 -d 10000 -c -u -v -r 10 -i 10
|
|
|
|
[ $? -ne 0 ] && echo "dlm_seq_sync error" >&2 && exit 1
|
|
|
|
./dlm_seq_async -i 100 -d 10000 -c -u -v -r 10 -i 10
|
|
|
|
[ $? -ne 0 ] && echo "dlm_seq_async error" >&2 && exit 1
|
|
|
|
pkill dlm_controld
|
|
sleep 2
|
|
corosync-cfgtool -H
|