LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 09-10-2007, 02:45 AM   #1
saintkay
LQ Newbie
 
Registered: Aug 2007
Location: Kampala, Uganda, East Africa
Distribution: debian 4.0
Posts: 27

Rep: Reputation: 0
Unhappy what is a raw device?


I am a linux newbie quite often I've across the term raw device. For Christ's sake what does it mean and what options do i have to pass when iam mounting such a device?
 
Old 09-10-2007, 06:35 AM   #2
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 31
Generally when you access(read or write) a device without going through the usual layers, it is considered a "raw" access. For a harddrive, the usual layer would be a filesystem.

When you click "save" to save a file, the writing is handled/organized by the filesystem.

If you do this (as root), 'less /dev/sda', then you will view the raw output of what your harddrive disk looks like.

Raw access to devices is a feature in Linux that can be very powerful, but must be used with care.
 
Old 09-17-2007, 12:13 PM   #3
lonehacker
LQ Newbie
 
Registered: Sep 2007
Distribution: Debian
Posts: 6

Rep: Reputation: 0
Raw by definition means you are not mounting it. It may or may not also mean that the kernel won't buffer/cache/etc data to and from the hardware.

If you mounted /dev/sda or /dev/hda or whatever, then you would see the filesystem on it, like '/' or '/home' or whatever.
If you don't mount it, then you (or a program) can see the bytes that make up the filesystem directly, like the previous poster said.

There is a further (stricter) meaning of 'raw device', too. When you access /dev/sda etc, you're bypassing the kernel's filesystem layers, but you're not bypassing its buffered I/O layers.

Some software (such as I believe Oracle, optionally) thinks it knows better than the kernel how to buffer/optimise disk I/O and lay out data, so it bypasses both layers, and uses other 'raw' devices. These 'raw' devices used to be called /dev/raw[1-8] (see man MAKEDEV), but they're obsolete in kernel 2.6.22.1 according to its kconfig help.
 
  


Reply

Tags
mounting


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
Good Raw Device tutorial akerber00 Suse/Novell 4 07-15-2007 12:13 AM
what is raw device? DataSheet Linux - Newbie 19 01-08-2007 04:13 PM
Do we need partition table for RAW device masand Linux - Hardware 1 02-22-2006 07:52 PM
Cannot open master raw device MDColson Mandriva 1 12-31-2004 02:55 PM
SuSE: How to create raw device stjacqd Linux - General 3 07-22-2004 07:29 PM


All times are GMT -5. The time now is 07:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration