Is there a way to enable fault-injection in kernel?

Solution Verified - Updated -

Issue

  • Question is related more towards "how to cause/simulate a failure".
    Example:
    Let's say to simulate a mounted filesystem going read only while an application is running and using it. Similar to:
mount -o remount,abort /<some mount point

Also reading the documentation in kernel.org there reference to:

https://www.kernel.org/doc/Documentation/fault-injection/fault-injection.txt

Is there a way to enable this? Looking at what was compiled into the kernel, the option was not set, rather then re-compiling, is there a Red Hat tool that is available or recommended method to simulate failures.

[11:30]:[root@lvsdpehdc4en0001:boot]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[11:30]:[root@lvsdpehdc4en0001:boot]# uname -r
2.6.32-279.22.1.el6.x86_64
[11:30]:[root@lvsdpehdc4en0001:boot]# grep FAULT_INJECTION config-2.6.32-279.22.1.el6.x86_64 
# CONFIG_FAULT_INJECTION is not set

Environment

  • Red Hat Enterprise Linux 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content