Does "/usr/bin/raw" command available in Red Hat Enterprise Linux 9?
Environment
- Red Hat Enterprise Linux 9
- kernel-5.14.0-70.22.1.el9_0.x86_64 and later
- util-linux-2.37.4-3.el9.x86_64 and later
Issue
- Which package provides the
/usr/bin/rawcommand on RHEL 9? - Can't find
/usr/bin/rawcommand on RHEL9? - "Process Request task
(pid ) is using the deprecated raw device" messages in RHEL 8.
Resolution
-
Applications should use
open()calls with theO_DIRECToption instead of depending on and utilizing the/dev/rawcharacter devices./dev/rawdevices are a character device that maps on top of a block storage device (disk) and converts all reads and writes into direct io accesses. Opening the device or files on a device in theO_DIRECTmode accomplish the same functionality.
-
The
/usr/bin/rawcommand interface for/dev/rawdevices was removed from the util-linux shipped in RHEL 9.- The /dev/raw driver was removed from the upstream kernel as of v5.14.
- The /dev/raw interface was removed upstream and so is no longer available within the RHEL 9 kernel which is based on the v5.14 upstream kernel.
Root Cause
/dev/rawsupport was removed from RHEL 9 per upstream changes-
/dev/rawkernel driver support was removed upstream via the following kernel commit:commit 603e4922f1c81fc2ed3a87b4f91a8d3aafc7e093 Date: Mon May 31 10:25:26 2021 +0300 remove the raw driver The raw driver used to provide direct unbuffered access to block devices before O_DIRECT was invented. It has been obsolete for more than a decade. -
/usr/bin/rawutility was removed from RHEL 9'sutil-linuxpackage as noted here within that package's change log:* Fri Jul 23 2021 - 2.37.1-1 - upgrade to v2.37.1 (fix #1984900, #1971989, and #1938894) - fix #1984771 - disable raw -
Within RHEL 8's
man rawdocumentation there is an added note hinting on the deprecation of the /dev/raw interface within the kernel and likely removal in a later major kernel release:NOTE Rather than using raw devices applications should prefer open(2) devices, such as /dev/sda1, with the O_DIRECT flag.
Diagnostic Steps
-
Warning messages reported in RHEL 8:
kernel: process Request task 22 (pid 4119) is using the deprecated raw device#012support will be removed in Linux 5.14. kernel: process Request task 22 (pid 4119) is using the deprecated raw device#012support will be removed in Linux 5.14. kernel: process Request task 22 (pid 4119) is using the deprecated raw device#012support will be removed in Linux 5.14.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments