[SOLVED] Does LINUX KERNEL SUPPORT RAW DEVICES BY DEFAULT ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does LINUX KERNEL SUPPORT RAW DEVICES BY DEFAULT ?
Dear all;
I read , Linux does NOT natively give us any facility to create by default raw devices. Kernel natively does not support raw devices. If so, why linux has /dev/raw* ?
PHP Code:
# ls -l /dev/raw* crw------- 1 root root 162, 0 Jan 2 19:05 /dev/rawctl
Distro RHEL but which version (you can cat /etc/redhat-release to determine version).
Anyway Linux kernel does support raw. For a while they said raw was deprecated and would be removed in future releases because of directIO but they apparently rescinded that deprecation sometime back.
You can use the "raw" command to bind raw devices. Type "man 8 raw" for details of that command. Depending on version you may also be able to use udev rules.
Your tutor is wrong.
raw is noted as deprecated (and has been for many years), but is still supported on the latest 4.4 kernel I am running. From the kernel options:
Quote:
Help text
The raw driver permits block devices to be bound to /dev/raw/rawN. Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. See the raw(8) manpage for more details.
The raw driver is deprecated and will be removed soon. Applications should simply open the device (eg /dev/hda1) with the O_DIRECT flag.
I'm wondering why you are using such an old system. RHEL was first released in February, 2015 and the update 8 over 6 years ago and support for any ended a year ago. I don't know that the support would matter but it is very outdated. I would think using CentOS which is basically Red Hat without the Trademarks and support would be better as you can download a current version for free.
However, it is true that unlike UNIX variants such as Solaris, AIX and HP-UX, Linux does not create a raw (character) device for each disk automatically. UNIX variants do and often require administrative tools to use the raw rather than the block device. Linux uses the block device for administration so you only need raw (character) devices for specialized applications such as Oracle ASM for databases.
RAW==> raw is deprecated so taht there is no raw device name assigned by linux because kernel natively does NOT support.
Just because it doesn't create a raw device for each disk automatically doesn't mean it doesn't support raw devices...you just have to use the "raw" command to make them.
Just because it doesn't create a raw device for each disk automatically doesn't mean it doesn't support raw devices...you just have to use the "raw" command to make them.
Yep and I said that in my first reply to the OP. I also noted the previous deprecation was retracted at some point. Looking today I see that retraction was suggested by someone at RedHat back in 2007.
In Linux kernel, raw devices were deprecated and scheduled for removal at one point, because the O_DIRECT flag can be used instead.[2] However, later the decision was made to keep raw devices support since some software cannot use the O_DIRECT flag.
Deprecated does not mean removed - it means they suggest you don't use it. The deprecation was because they intended to remove it at some future point but never actually did.
Last edited by MensaWater; 01-08-2016 at 12:39 PM.
/dev/sd<x> ---> SCSI Disk
/dev/hd<x> ---> Non-SCSI Hard Disk (e.g. IDE)
/dev/sd<x><#> = partition on the disk (e.g /dev/sdb4 would be the 4th partition on second SCSI disk, sdb)
/dev/hd<x><#> = partition on the disk (e.g. /dev/hda1 would be the first partition on the first non-SCSI disk, hda)
They supposedly made a change in the kernel some time back to get rid of /dev/hd* nomenclature for most purposes but I do still see some things like USB drives come up that way. Most drives however, use the /dev/sd<x> naming as of 2.6.x kernels. Most hardware RAID controllers like Dell PERC (LSI OEM) and SAN presented disks are going to show up as /dev/sd<x>.
The above devices are not "filesystems" but you can layout filesystems on them. You can also use them as the basis for raw devices by using the raw command I mentioned early on to bind them. You can also use them for things like swap.
However, it is true that unlike UNIX variants such as Solaris, AIX and HP-UX, Linux does not create a raw (character) device for each disk automatically. UNIX variants do and often require administrative tools to use the raw rather than the block device. Linux uses the block device for administration so you only need raw (character) devices for specialized applications such as Oracle ASM for databases.
ASM Feature Supports 2 different types of IO.
PHP Code:
Standard UNIX IO and ASMLib IO AS We know I/O - Input/Output
PHP Code:
I want to know 'Oracle ASM implementation using UNIX Standadared I/O' ? What is this exactly/what it does ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.