Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.