Sponsored Content
Full Discussion: How raw disks are read?
Top Forums UNIX for Advanced & Expert Users How raw disks are read? Post 302802733 by sant on Saturday 4th of May 2013 03:25:47 PM
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?
 

8 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

NAME
pread, pwrite - read from or write to a file descriptor at a given offset SYNOPSIS
#define _XOPEN_SOURCE 500 #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); 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, the number of bytes read or written is returned (zero indicates that nothing was written, in the case of pwrite(), or end of file, in the case of pread()), or -1 on error, in which case errno is set to indicate 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. SEE ALSO
lseek(2), read(2), write(2), feature_test_macros(7) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-12-03 PREAD(2)
All times are GMT -4. The time now is 08:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy