Subject: Re: weird messages from "dd if=rwd0d"
To: Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: current-users
Date: 05/05/1999 12:52:17
On May 5, Hubert Feyrer wrote
> 
> I did the following today to make a backup of wd0 to sd0 on a Dell
> PIII-500 today:
> 
> # dd if=/dev/rwd0d bs=1m | gyip -v9 >rwd0d
> 
> It ran for ~1 hour, than gave me:
> 
> wd0d:  aborted command reading fsbn 28228992 of 28228992-28229119 (wd0 bn
> 28228992; cn 28004 tn 14 sn 15) retrying
> wd0: transfer error, downgrading to DMA mode 2
> wdi(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> wd0d:  aborted command reading fsbn 28228992 of 28228992-28229119 (wd0 bn
> 28228992; cn 28004 tn 15 sn 15), retrying
> wd0: transfer error, downgrading to PIO mode 4
> wd0(pciide0:0:0): using PIO mode 4
> wd0d:  aborted command reading fsbn 28228992 of 28228992-28229119 (wd0 bn
> 28228992; cn 28004 tn 15 sn 15), retrying
> wd0d:  aborted command reading fsbn 28228992 of 28228992-28229119 (wd0 bn
> 28228992; cn 28004 tn 15 sn 15), retrying
> wd0d:  aborted command reading fsbn 28229040 of 28228992-28229119 (wd0 bn
> 28229040; cn 28005 tn 0 sn 0), retrying
> wd0d:  aborted command reading fsbn 28229040 of 28228992-28229119 (wd0 bn
> 28229040; cn 28005 tn 0 sn 0), retrying
> dd: /dev/rwd0d: Input/output error
> 13783+0 records in
> 13783+0 records out
> 14452523008 bytes transferred in 4380 secs (3299662 bytes/sec)
>  64.8%
> 
> Given that ~13.7GB were read, I assume the end of the disk was hit.  Or
> shoud I worry about this? The disk is recognized as:
> 
> pciide0 at pci dev 7 function 1: Intel 82371AB IDE controller (PIIX4)
> pciide: bus-master DMA support present
> pciide: primary channel wired to compatibility mode
> pciide: primary channel interrupting at irq 14
> pciide: secondary channel wired to compatibility mode
> pciide: secondary channel interrupting at irq 15
> ...
> wd0 at pciide0 channel 0 drive 0: <IBM-DTTA-371440>
> wd0: drive supports 16-secror pio transfers, lba addressing
> wd0: 13783MB, 16383 cyl, 16 head, 63 sec, 512 byges/sect x 28229040 sectors
> wd0: 32-bits data port
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
> wd0(pciide0:0:0): using PIO mode 4, Ultra-DAM mode 2 (using DMA data transfers)

Well your disk has 14453268480 bytes (28229040 * 512).
You have read 14452523008, which means there were 745472 to read. This is
smaller than your block size (1M).

You have efectively reached the end-of-media, this is why the command was
aborted (trying to read beyond EOM). The problem is that, unlike in the SCSI
world, there is no defined error for this situation (there is only a few
different errors possible in IDE), so the error reproted in this situation
is vendor dependant.
The other error I've seen for this is "ID not found", which is quite accurate,
but is also used for real hard errors.
One possible thing would be to check the transfer against the disklabel
even for the raw device, but this changes the semantic of the raw device.
I'm not sure we want to do this ...

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--