LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-07-2016, 10:52 AM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Rep: Reputation: Disabled
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 1620 Jan  2 19:05 /dev/rawctl 
Distro :RHEL
 
Old 01-07-2016, 12:39 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 15,943

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Where did you read linux does not support raw devices? What are you trying to accomplish?
 
Old 01-07-2016, 12:43 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
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.
 
1 members found this post helpful.
Old 01-07-2016, 09:32 PM   #4
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Original Poster
Rep: Reputation: Disabled
Hi MensaWater and michaelk

Sorry michaelk, Little correction:

Those points were given by my tutor (who is teaching Linux subject)
what he told i am saying here.

PHP Code:
SOLARIS 

BLOCK 
==> /dev/dsk/cntndnsn
RAAW  
==> /dev/rdsk/cntndnsn

AIX 
:

BLOCK ==> /dev/hdiskn/cntndnsn
RAW   
==> /dev/rhdiskn

LINUX 
:

BLOCK ==> /dev/sd<x>  (-> sda sdbsdc
RAW==> raw is deprecated so taht there is no raw device name assigned by linux because kernel natively does NOT support.

PHP Code:
# cat redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 8

Last edited by Joy Stick; 01-07-2016 at 09:33 PM.
 
Old 01-07-2016, 09:53 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,731

Rep: Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125Reputation: 2125
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.
 
Old 01-08-2016, 08:14 AM   #6
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,281

Rep: Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381Reputation: 1381
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.

https://access.redhat.com/articles/3078#RHEL4
 
1 members found this post helpful.
Old 01-08-2016, 08:38 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
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.
 
1 members found this post helpful.
Old 01-08-2016, 09:57 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,508

Rep: Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102Reputation: 2102
Quote:
Originally Posted by Joy Stick View Post
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.
 
1 members found this post helpful.
Old 01-08-2016, 10:01 AM   #9
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Quote:
Originally Posted by suicidaleggroll View Post
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.
 
Old 01-08-2016, 11:53 AM   #10
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Original Poster
Rep: Reputation: Disabled
Actual my question is ' as we know raw is deprecated from linux. if so Why still linux has /dev/raw* ?

# ls -l /dev/raw*
crw------- 1 root root 162, 0 Jan 2 19:05 /dev/rawctl

That was my actual question.

The raw driver is deprecated and will be removed soon.
Applications should simply open the device (eg /dev/hda1) with the O_DIRECT flag.


/dev/hda1- is this file system in linux ??
 
Old 01-08-2016, 12:38 PM   #11
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Quote:
Originally Posted by Joy Stick View Post
as we know raw is deprecated from linux.
I think you've missed twice now I've said it is NOT deprecated in Linux any longer although at one point it was:

From:
https://en.wikipedia.org/wiki/Raw_device

Quote:
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.
 
1 members found this post helpful.
Old 01-08-2016, 01:59 PM   #12
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Original Poster
Rep: Reputation: Disabled
Hi there,

/dev/sd<x> ---> I can understabd
/dev/hda1 ---> is this new file system ? or some other ?

Thanks All
 
Old 01-08-2016, 02:55 PM   #13
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
/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.
 
1 members found this post helpful.
Old 01-08-2016, 04:44 PM   #14
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Original Poster
Rep: Reputation: Disabled
Thanks MensaWater and thanks all.
 
Old 01-28-2016, 11:55 PM   #15
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 103

Original Poster
Rep: Reputation: Disabled
HELLO MENSA WATER

Quote:
Originally Posted by MensaWater View Post
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/Input/Output 
PHP Code:
I want to know  'Oracle ASM implementation using UNIX Standadared I/O' ?
What is this exactly/what it does 
If possible , please post your answer on following thread.
http://www.linuxquestions.org/questi...85#post5489085

Hopefully i am expecting your reply.
It would help me

Last edited by Joy Stick; 01-29-2016 at 12:02 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Kernel 3.2.61 LTS Officially Released with Support for New Devices LXer Syndicated Linux News 0 07-13-2014 04:11 AM
Binding raw devices in kernel 2.6 galapogos Programming 1 07-03-2009 10:10 PM
How to create chunks (blocks) not raw devices in linux ? ytd Linux - Newbie 15 01-27-2009 07:46 AM
Require Raw devices on FC3 - New to Linux mikeh7519 Fedora 0 11-10-2005 06:36 PM
Does 2.6 kernel support RAW fs? Caesar Linux - General 1 06-02-2004 04:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration