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
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
PREAD(2)						     Linux Programmer's Manual							  PREAD(2)

NAME
pread, pwrite - read from or write to a file descriptor at a given offset SYNOPSIS
#include <unistd.h> ssize_t pread(int fd, void *buf, size_t count, off_t offset); ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): pread(), pwrite(): _XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L DESCRIPTION
pread() reads up to count bytes from file descriptor fd at offset offset (from the start of the file) into the buffer starting at buf. The file offset is not changed. pwrite() writes up to count bytes from the buffer starting at buf to the file descriptor fd at offset offset. The file offset is not changed. The file referenced by fd must be capable of seeking. RETURN VALUE
On success, pread() returns the number of bytes read (a return of zero indicates end of file) and pwrite() returns the number of bytes written. Note that it is not an error for a successful call to transfer fewer bytes than requested (see read(2) and write(2)). On error, -1 is returned and errno is set to indicate the cause of the error. ERRORS
pread() can fail and set errno to any error specified for read(2) or lseek(2). pwrite() can fail and set errno to any error specified for write(2) or lseek(2). VERSIONS
The pread() and pwrite() system calls were added to Linux in version 2.1.60; the entries in the i386 system call table were added in 2.1.69. C library support (including emulation using lseek(2) on older kernels without the system calls) was added in glibc 2.1. CONFORMING TO
POSIX.1-2001, POSIX.1-2008. NOTES
The pread() and pwrite() system calls are especially useful in multithreaded applications. They allow multiple threads to perform I/O on the same file descriptor without being affected by changes to the file offset by other threads. C library/kernel differences On Linux, the underlying system calls were renamed in kernel 2.6: pread() became pread64(), and pwrite() became pwrite64(). The system call numbers remained the same. The glibc pread() and pwrite() wrapper functions transparently deal with the change. On some 32-bit architectures, the calling signature for these system calls differ, for the reasons described in syscall(2). BUGS
POSIX requires that opening a file with the O_APPEND flag should have no effect on the location at which pwrite() writes data. However, on Linux, if a file is opened with O_APPEND, pwrite() appends data to the end of the file, regardless of the value of offset. SEE ALSO
lseek(2), read(2), readv(2), write(2) Linux 2017-09-15 PREAD(2)