Sometimes we need to crash the system for testing of cluster fencing functionality and fail-over functionality. Actually in Linux we can create a fake kernel panic by issuing below commands.

root@ankara # echo 1 > /proc/sys/kernel/sysrq  #1 - enable all functions of sysrq
root@ankara # echo "c" > /proc/sysrq-trigger   #

Will perform a system crash by a NULL pointer dereference. A crash dump will be taken if configured.

Reference

Written by

yilgo

Scribbles of a Platform Engineer