Raw devices in C


 
Thread Tools Search this Thread
Top Forums Programming Raw devices in C
# 1  
Old 09-28-2010
Raw devices in C

Hi guys.

what is the benefits of using raw devices in programming?
which applications mostly use raw devices?
how can i use raw devices in C programs? is there any system calls or library functions?
# 2  
Old 09-28-2010
There a more drawbacks to doing that than there are advantages. Oracle and other high I/O demand products usually will work with raw devices to bypass the overhead of a filesystem. This means Oracle keeps track of everything on the disk, like the location of data items.

Basically you are also bypassing security and other featuresprovided by the kernel/filesystem to gain I/O speed.

All of your code has to run as root, so it means you can damage the kernel itself quite easily.

This is how to create raw devices for RedHat Linux that you access via your driver code:
How To Add Raw Device Mapping In Red Hat Enterprise Linux 5?

You can call open, close, read & write on a raw device fd you get from calling open. If you are running as root.
This User Gave Thanks to jim mcnamara For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Raw Devices

Can you please modify my script. This script is not working for i in /dev/sdf do /bin/raw /dev/raw/`/bin/basename ${i}` ${i} /bin/sleep 2 /bin/chown orasm:ordba /dev/raw/`/bin/basename ${i}` /bin/chmod 660... (9 Replies)
Discussion started by: karthik9358
9 Replies

2. Filesystems, Disks and Memory

Raw volumes

The query is as follows : A typical server configs when using Oracle or any other type of DB is to install the OS + DB binaries on the internal disks of the relevant server e.g. Disk 1 : OS + SW + DB binaries Disk 2 : Mirror of disk 1 (used for resiliency) Then one uses an external array... (1 Reply)
Discussion started by: kekanap
1 Replies

3. UNIX for Dummies Questions & Answers

passthrough devices vs. named devices

I am having trouble understanding the difference between a passthrough device and a named device and when you would use one or the other to access equipment. As an example, we have a tape library and giving the command "camcontrol devlist" gives the following output: akx# camcontrol... (1 Reply)
Discussion started by: thumper
1 Replies

4. AIX

Raw I/o

Is there any system call available in AIX to read the size of raw disk? If I use the command "lspv -L",it only gives size of PVs on which file system is there. I need to extract the size raw disk i.e. file system is not there on the disk. Thanks, Megha (6 Replies)
Discussion started by: MeghaV
6 Replies

5. AIX

Error on HACMP5.3 volume group on raw devices after exporting vg

Hi all, We have a problem after exporting a exhanced concurrent capable VG accessed in concurrent mode, created on raw devices ( pSeries 590 AIX5.3 + HACMP5.3 +SAN4300) from node A to node B. On node B the VG is correct activated by HACMP, but on node A we have 0516-306 error "Unable to find... (3 Replies)
Discussion started by: cris1357
3 Replies

6. UNIX for Dummies Questions & Answers

raw disk

What do u mean by raw and cooked disk? What are the advantages of having raw disk? Thanks n regards, (1 Reply)
Discussion started by: kingsto88
1 Replies

7. UNIX for Advanced & Expert Users

copying data to raw devices using 'dd'

Hello all, I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction. Here's the problem. I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines... (4 Replies)
Discussion started by: Neville
4 Replies

8. Solaris

About raw partition

Hi I have solaris 8 installed on Intel machine. the disk I have is IDE. I would like to know how can I create a raw partition on an IDE disk. Regards, Raja (2 Replies)
Discussion started by: RajaRC
2 Replies
Login or Register to Ask a Question