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.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
LEARN ABOUT DEBIAN
io_tryread
io_tryread(3) Library Functions Manual io_tryread(3)
NAME
io_tryread - read from a descriptor without blocking
SYNTAX
#include <io.h>
int io_tryread(int64 fd,char* buf,int64 len);
DESCRIPTION
io_tryread tries to read len bytes of data from descriptor fd into buf[0], buf[1], ..., buf[len-1]. (The effects are undefined if len is 0
or smaller.) There are several possible results:
o o_tryread returns an integer between 1 and len: This number of bytes was available for immediate reading; the bytes were read into the
beginning of buf. Note that this number can be, and often is, smaller than len; you must not assume that io_tryread always succeeds in
reading exactly len bytes.
o io_tryread returns 0: No bytes were read, because the descriptor is at end of file. For example, this descriptor has reached the end of
a disk file, or is reading an empty pipe that has been closed by all writers.
o io_tryread returns -1, setting errno to EAGAIN: No bytes were read, because the descriptor is not ready. For example, the descriptor is
reading an empty pipe that could still be written to.
o io_tryread returns -3, setting errno to something other than EAGAIN: No bytes were read, because the read attempt encountered a persis-
tent error, such as a serious disk failure (EIO), an unreachable network (ENETUNREACH), or an invalid descriptor number (EBADF).
io_tryread does not pause waiting for a descriptor that is not ready. If you want to pause, use io_waitread or io_wait.
You can make io_tryread faster and more efficient by making the socket non-blocking with io_nonblock().
SEE ALSO
io_nonblock(3), io_waitread(3), io_tryreadtimeout(3)
io_tryread(3)