Sponsored Content
Full Discussion: Blockdev vs /sys/block/
Special Forums Hardware Filesystems, Disks and Memory Blockdev vs /sys/block/ Post 302905586 by Sergiu-IT on Thursday 12th of June 2014 08:53:05 AM
Old 06-12-2014
Blockdev vs /sys/block/

Hello,

I want to set/get the read-ahead for my disks and there is a little issue that confuses me. There are three ways to get/set the read-ahead buffer:

1. cat /sys/block/md0/bdi/read_ahead_kb
2. cat /sys/block/md0/queue/read_ahead_kb
3. blockdev --getra /dev/md0

Which one is the correct one? The first two gives me a value of 128. The last one gives me a value of 256. Where does this difference come from?
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Sys Administration

What happend to the Administration board, How come no one posts there? (1 Reply)
Discussion started by: tovsky
1 Replies

2. UNIX for Dummies Questions & Answers

BSD Sys 5????

Since I failed a test that I didn't have the chance to study for, my wonderful instructor told me to write a paper about BSD sys 5. I can't find anything...does it even exist yet??? If you have any input, I would love you forever if you can enlighten me ASAP. (2 Replies)
Discussion started by: Toughgirl27
2 Replies

3. Shell Programming and Scripting

sys info script

Hi, i need a shell script that write in a file called sys.txt this: <output of date command> HN <host name> OS <OS name> <OS version> I can have this info with uname command, but I can't write these in sys.txt. Can any one help me? (1 Reply)
Discussion started by: FastMagister
1 Replies

4. Solaris

Differences Sys 5 and BSD

Hi I would like to know the difference between System V release and BSD style release. Regards, Raja (2 Replies)
Discussion started by: RajaRC
2 Replies

5. Solaris

Any sys admins from uk?

Hello Guys, im new to this forum. Im from UK and ive recently completed my SCSA I & II and also got trained in Veritas Suite (Veritas Volume Manager and Veritas Clusters, Veritas NetBackup), SAN Configuration. I was trying to get a break as a junior sun solaris admin. I am applying for the jobs... (1 Reply)
Discussion started by: megadeth
1 Replies

6. Programming

Hi errno in sys/stat.h

How should I use errno in a c program and what info does it have . I am working with directories and files. So can any one tell me How to access errno?I am using the stat() function on \etc directory and I am alble to access only the half of the directories.I am not able to access other half and... (6 Replies)
Discussion started by: vijlak
6 Replies

7. What is on Your Mind?

Network Sys Admin

Hi, my name is wesly. I an IT tech at the Junior Level. I have a bachelors degree in Computer Information Systems. I would like to fully become a Unix Sys Admin. Can anyone please tell me what I have to do. Do I have to set up a Unix or Linux server. How about Apache. Please give me clues and tips... (1 Reply)
Discussion started by: wes.lat
1 Replies

8. Solaris

Sys Admin Certification

Hi, I am planning to get certified in Solaris 10 for my own interest. Although I don't have much experience in sys admin, I have got some background in scripting and some sort of beginner level administration. But I have read in many places that one must have a good amount of experience in sys... (8 Replies)
Discussion started by: King Nothing
8 Replies

9. UNIX for Dummies Questions & Answers

need help about config. sys message.

Dear All, I am trying to config a sys mail message on solaris 10. I am doing the following commands but it dose not work with me; #touch /var/mail-test #vi /etc/syslog.cong local0.notice /var/mail-test #svcadm disable svcs:/system/system-log:default #svcadm enable... (1 Reply)
Discussion started by: ahmedamer12
1 Replies

10. Programming

Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug?

(Apologies for any typos.) OSX 10.12.3 AND Windows 10. This is for the serious Python experts on at least 3.5.x and above... In script format sys.stdout.write() AND sys.stderr.write() seems to work correctly. Have I found a serious bug in the interactive sys.stdout.write() AND... (2 Replies)
Discussion started by: wisecracker
2 Replies
RX(4)							     Kernel Interfaces Manual							     RX(4)

NAME
rx - DEC RX02 floppy disk SYNOPSIS
/sys/conf/SYSTEM: NRX rx_units # RX02 /etc/dtab: #Name Unit# Addr Vector Br Handler(s) # Comments rx ? 177170 264 5 rxintr # rx02 major device number(s): raw: 17 block: 8 minor device encoding: bit 01 specifies drive: <rx_drive> bit 02 specifies density: single: 0, double: 1 DESCRIPTION
The rx device provides access to a DEC RX02 floppy disk unit with M8256 interface module (RX211 configuration). The RX02 uses 8-inch, sin- gle-sided, soft-sectored floppy disks (with pre-formatted industry-standard headers) in either single or double density. Floppy disks handled by the RX02 contain 77 tracks, each with 26 sectors (for a total of 2,002 sectors). The sector size is 128 bytes for single density, 256 bytes for double density. Single density disks are compatible with the RX01 floppy disk unit and with IBM 3740 Series Diskette 1 systems. Files with minor device numbers 0 and 1 refer to drives 0 and 1 in single density mode; minor devices 2 and 3 refer to drives 0 and 1 in double density mode. The standard device names begin with ``rx'' followed by the drive number and then a letter a-b for single and double density access to the drive respectively. The character ? stands here for a drive number in the range 0-1. The block files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk records. There is also a `raw' interface which provides for direct transmission between the disk and the user's read or write buffer. A single read or write call results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of the raw files conventionally begin with an extra `r.' In raw I/O the buffer must begin on a word (even) boundary, and counts should be a multiple of the disk's sector size (either 128 or 256 bytes depending on selected density.) Likewise seek calls should specify a multiple of the disk's sector size. In addition to normal (`block' and `raw') i/o, the driver supports formatting of disks for either density. DISK SUPPORT
The rx driver does not support pseudo-disks (partitions). Each file rx?[ab] refers to the entire drive as a single sequentially addressed file. The physical disk sector size is 128 bytes for single density and 256 bytes for double density. The logical block size is 1024 bytes. Each diskette has 250 logical blocks in single density and 500 logical blocks in double density. The size and density of the disks are specified as follows: disk minor device unit density rx0a 0 0 single rx1a 1 1 single rx0b 2 0 double rx1b 3 1 double Even though the storage capacity on a floppy disk is quite small, it is possible to make file systems on them. For example, the commands % rxformat /dev/rrx0a % newfs /dev/rrx0a and % rxformat /dev/rrx1b % newfs /dev/rrx1b format and make file systems on the single density disk in the left drive and the double density disk in the right drive with 241 and 486 kbytes available, respectively, for file storage. Using tar(1) gives somewhat more efficient utilization of the available space for file storage. The RX02 disks are primarily useful for small archives and transfer of small systems or distributions. An ioctl(2) call is available is available to format RX02 disks: #include <pdpuba/rxreg.h> ioctl(fildes, RXIOC_FORMAT) The density is determined by the device opened. FILES
/dev/rx[01][ab] block files /dev/rrx[01][ab] raw files /dev/MAKEDEV script to create special files /dev/MAKEDEV.local script to localize special files SEE ALSO
hk(4), ra(4), ram(4), rk(4), rl(4), rp(4), si(4), xp(4), dtab(5), autoconfig(8), rxformat(8V) DIAGNOSTICS
rx2%d: hard error sn%d cs=%b er=%b. An unrecoverable error occurred during transfer of the specified sector of the specified disk. The contents of the two error registers are also printed in octal and symbolically with bits decoded. The error was either unrecoverable, or a large number of retry attempts could not recover the error. BUGS
In raw I/O read and write(2) truncate file offsets to disk sector size block boundaries (either 128 or 256 bytes depending on the selected density), and write scribbles on the tail of incomplete blocks. Thus, in programs that are likely to access raw devices, read, write and lseek(2) should always deal in disk sector size multiples. DEC-standard error logging should be supported. A program to analyze the logged error information (even in its present reduced form) is needed. The 4.3BSD rx driver which supports more capabilities should be ported to 2.11BSD. 3rd Berkeley Distribution January 27, 1996 RX(4)
All times are GMT -4. The time now is 06:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy