Situation: two redundant FreeBSD machines using CARP to share a primary IP, running a frontend proxy (E.G. HAproxy or nginx)
Primary machine experiences a loss of SCSI disk (E.G. disk failure, SAN storage failure, etc) and services fail (L7 timeouts on the web service, for example) because of the loss of disk access. However because the kernel is alive, CARP does not fail over to the backup.
How can I configure the machine to panic if the disk errors exceed a certain threshold so that the machine will stop sending CARP advertisements and the backup will take over?