From owner-freebsd-scsi Thu Jun 28 5:22: 5 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from ns5.pacific.net.au (ns5.pacific.net.au [203.143.252.30]) by hub.freebsd.org (Postfix) with ESMTP id C637737B401 for ; Thu, 28 Jun 2001 05:22:01 -0700 (PDT) (envelope-from mckay@thehub.com.au) Received: from dungeon.home (ppp153.dyn248.pacific.net.au [203.143.248.153]) by ns5.pacific.net.au (8.9.0/8.9.1) with ESMTP id WAA28076; Thu, 28 Jun 2001 22:21:57 +1000 (EST) Received: from dungeon.home (localhost [127.0.0.1]) by dungeon.home (8.11.3/8.11.1) with ESMTP id f5SCPJY13905; Thu, 28 Jun 2001 22:25:19 +1000 (EST) (envelope-from mckay) Message-Id: <200106281225.f5SCPJY13905@dungeon.home> To: freebsd-scsi@freebsd.org Cc: mckay@thehub.com.au Subject: Problems reading burned CDs Date: Thu, 28 Jun 2001 22:25:18 +1000 From: Stephen McKay Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Some months ago I made vague assertions that one must use a 2 kilobyte block size when reading raw CD data, or risk missing the last part of the CD. Then I couldn't reproduce it, so blamed some mystery past version of FreeBSD. Actually, the difference is pressed vs burned CDs. If I read pressed CDs they all seem to end with a very long run of blocks of zeroes. No problem if I try to read a large block straddling the logical end of disk. But burned CDs appear to end suddenly, and a read request straddling the end of data will fail, and the partial contents will not be returned. Here is an example from reading a (short) burned CD on a Toshiba XM-5701 SCSI CD-ROM, on a 4.3-R system: # dd if=/dev/cd1c of=/dev/null bs=2k dd: /dev/cd1c: Input/output error 8367+0 records in 8367+0 records out 17135616 bytes transferred in 88.964899 secs (192611 bytes/sec) # dd if=/dev/cd1c of=/dev/null bs=4k dd: /dev/cd1c: Input/output error 4183+0 records in 4183+0 records out 17133568 bytes transferred in 88.895442 secs (192738 bytes/sec) Also, the system logs "Random positioning error" scsi errors, and there is a 60 second lag between reading the last sector and actually reporting the error (for retries, I presume). The 60 second delay explains the abysmal read speed, so don't panic about that. Checking on my burner, the error logged is "Illegal mode for this track" which causes no extra delay. But it still truncates the last block, losing data. My IDE cdrom does not log any sort of error, nor suffer an end-of-media delay, but it gets the size wrong by one sector. I'm told this has been fixed in -stable, but I've not checked. Anyway, this indicates to me that this is a SCSI CD problem, not a general CD problem. Is there any way around these problems with SCSI CD drives? Stephen. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message