View Single Post
  #7   (View Single Post)  
Old 31st December 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

@Phoenix, Apologies.. I was basing my claims on OpenBSD findings.

Each device has a block/character device, /dev/rcd0a and /dev/cd0a, respectively.
  • Block devices are buffered devices.. used only by mount(8). (Usually...).
  • Character devices are unbuffered devices.. used by utilities like, dd(1) for instance.
Code:
[bsdfan@bluebox $ttyp0]~/tests: $ disklabel cd1
# /dev/rcd1c:
type: ATAPI
disk: KR9053430
label:
flags:
bytes/sector: 2048
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 2310
total sectors: 230930
rpm: 300
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

3 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  a:           230930                0 ISO9660                   
  c:           230930                0 ISO9660                   
[bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=2k.iso bs=2k
230930+0 records in
230930+0 records out
472944640 bytes transferred in 159.694 secs (2961550 bytes/sec)
[bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=1m.iso bs=1m 
451+1 records in
451+1 records out
472944640 bytes transferred in 118.886 secs (3978121 bytes/sec)
[bsdfan@bluebox $ttyp0]~/tests: $ dd if=/dev/rcd1a of=10m.iso bs=10m
45+1 records in
45+1 records out
472944640 bytes transferred in 123.956 secs (3815423 bytes/sec)
[bsdfan@bluebox $ttyp0]~/tests: $ md5 2k.iso 1m.iso 10m.iso
MD5 (2k.iso) = 2870e9cf5455d769372bb5d45bc22d9c
MD5 (1m.iso) = 2870e9cf5455d769372bb5d45bc22d9c
MD5 (10m.iso) = 2870e9cf5455d769372bb5d45bc22d9c
[bsdfan@bluebox $ttyp0]~/tests: $ md5 /dev/rcd1a
md5: /dev/rcd1a: read error: Invalid argument
[bsdfan@bluebox $ttyp0]~/tests: $ md5 /dev/cd1a   
MD5 (/dev/cd1a) = 2870e9cf5455d769372bb5d45bc22d9c
[bsdfan@bluebox $ttyp0]~/tests: $
I don't see any instabilities.. and using a larger block size, does appear to increase the speed.

Things must work differently on FreeBSD...
Reply With Quote