Using blktrace to Debug Block Volume Errors

Use the blktrace command to trace and record block volume request operations for troubleshooting purposes.

Install the blktrace package by running the following the command:

sudo dnf install blktrace

Before running the blktrace command, mount the kernel level debugging file system:

sudo mount -t debugfs debugfs /sys/kernel/debug

To output live trace data, use the blktrace command with the blkparse command. For example, to view the trace data for the /dev/sda block volume, run the following command:

sudo blktrace -d /dev/sda -o -|blkparse -i -

To exit the blktrace command, press the Ctrl + C keys in combination.

For more information about using the blktrace command, see the blktrace(8) and blkparse(1) manual pages.