How raw disks are read?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How raw disks are read?
# 1  
Old 05-04-2013
How raw disks are read?

Hi Experts,

If I understand correctly in posix standard system calls read/write or pread/pwrite a file descriptor should be sent.
How it works in case of raw disk? Are there something like files on raw devices? Or these disks are read just using block coordinates?

I want to understand how OS works with a disk without filesystem and with filesystem. Is there good document?
# 2  
Old 05-04-2013
A raw disk is accessed through a file descriptor so is technically still a (single and big) file, as far as POSIX is concerned. There are operations that won't work like truncating or enlarging the file but otherwise, it can be read by seeking to the expected location and reading the data there. Same for writing.
# 3  
Old 05-04-2013
Point: With modern hardware a "raw disc" can be multiple physical discs which the Operating System sees as one physical disc.

Some research ideas:

Consider the case of a virgin disc. There are no filesystems unless your software creates a filesystem. You can write or read whatever you like within the physical dimensions of the disc.

The very basic filesystems follow the pattern of the original IBM tape format VOL1 HDR1.

For research purposes it is worth a look at CAFS (Content Addressable File Store). That's the way to use a raw disc! It's so much better than "Binary Tree", "Hash Random" or "Index Sequential" file systems when dealing with disorganised data.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Specify the raw format

Hey friends, i am trying to set up a raspbian wheezy vm on ma Unbuntu using qemu. when i try to run the setup command the error is: i tried to find something here in the forum but did not find anything. i was searching like 15 min pls dont roast me if there is a post explaining it. :)... (3 Replies)
Discussion started by: LinuxPlayer1809
3 Replies

2. 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

3. HP-UX

Converting RAW Disks to Filesystem

Hi, We have a new server which has 2.7 TB RAW Disk.Outof this we want to convery 1.2 TB to filesystem and nfs mount it on one of the servers. After our activity we need to convert this back to RAW Disks. Please let me know if this is possible and the complexity involved. Regards, VN (1 Reply)
Discussion started by: narayanv
1 Replies

4. Solaris

Solaris raw disks info

Hi, I need the following information. 1. We have raw disks but how to identify raw disks. Is there any command to identify its type and size. 2. How to differentiate between disks which are used as file system and that are still available to be used as raw. I know we can use df -n to... (7 Replies)
Discussion started by: malikshahid85
7 Replies

5. Fedora

Read only disks on Linux system

Hi guys I have a SSL server that is running Fedora 9. I wanted to create a directory but get: mkdir: cannot create directory `test': Read-only file system Any ideas? (4 Replies)
Discussion started by: wbdevilliers
4 Replies

6. 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

7. 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

8. 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
Login or Register to Ask a Question