# Buffer I/O error on device

## stoil

Hi,

At every boot I get:

```

Nov 24 09:49:30 stoil scsi0 : sata_nv

Nov 24 09:49:30 stoil ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

Nov 24 09:49:30 stoil ata1.00: ATA-7, max UDMA/133, 156301488 sectors: LBA48 NCQ (depth 0/32)

Nov 24 09:49:30 stoil ata1.00: ata1: dev 0 multi count 16

Nov 24 09:49:30 stoil ata1.00: configured for UDMA/133

Nov 24 09:49:30 stoil scsi1 : sata_nv

Nov 24 09:49:30 stoil ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)

Nov 24 09:49:30 stoil ata2.00: ATA-7, max UDMA/133, 156301488 sectors: LBA48 NCQ (depth 0/32)

Nov 24 09:49:30 stoil ata2.00: ata2: dev 0 multi count 16

Nov 24 09:49:30 stoil ata2.00: configured for UDMA/133

Nov 24 09:49:30 stoil Vendor: ATA       Model: ST3808110AS       Rev: 3.AA

Nov 24 09:49:30 stoil Type:   Direct-Access                      ANSI SCSI revision: 05

Nov 24 09:49:30 stoil SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

Nov 24 09:49:30 stoil sda: Write Protect is off

Nov 24 09:49:30 stoil sda: Mode Sense: 00 3a 00 00

Nov 24 09:49:30 stoil SCSI device sda: drive cache: write back

Nov 24 09:49:30 stoil SCSI device sda: 156301488 512-byte hdwr sectors (80026 MB)

Nov 24 09:49:30 stoil sda: Write Protect is off

Nov 24 09:49:30 stoil sda: Mode Sense: 00 3a 00 00

Nov 24 09:49:30 stoil SCSI device sda: drive cache: write back

Nov 24 09:49:30 stoil sda: sda1 sda2 < > sda3 sda4

Nov 24 09:49:30 stoil sda: p4 exceeds device capacity

Nov 24 09:49:30 stoil sd 0:0:0:0: Attached scsi disk sda

Nov 24 09:49:30 stoil Vendor: ATA       Model: ST3808110AS       Rev: 3.AA

Nov 24 09:49:30 stoil Type:   Direct-Access                      ANSI SCSI revision: 05

Nov 24 09:49:30 stoil SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)

Nov 24 09:49:30 stoil sdb: Write Protect is off

Nov 24 09:49:30 stoil sdb: Mode Sense: 00 3a 00 00

Nov 24 09:49:30 stoil SCSI device sdb: drive cache: write back

Nov 24 09:49:30 stoil SCSI device sdb: 156301488 512-byte hdwr sectors (80026 MB)

Nov 24 09:49:30 stoil sdb: Write Protect is off

Nov 24 09:49:30 stoil sdb: Mode Sense: 00 3a 00 00

Nov 24 09:49:30 stoil SCSI device sdb: drive cache: write back

Nov 24 09:49:30 stoil sdb: unknown partition table

Nov 24 09:49:30 stoil sd 1:0:0:0: Attached scsi disk sdb

Nov 24 09:49:30 stoil device-mapper: ioctl: 4.7.0-ioctl (2006-06-24) initialised: dm-devel@redhat.com

Nov 24 09:49:30 stoil md: raid0 personality registered for level 0

Nov 24 09:49:30 stoil md: raid1 personality registered for level 1

Nov 24 09:49:30 stoil md: raid10 personality registered for level 10

Nov 24 09:49:30 stoil JFS: nTxBlock = 8192, nTxLock = 65536

Nov 24 09:49:30 stoil ReiserFS: dm-5: found reiserfs format "3.6" with standard journal

Nov 24 09:49:30 stoil ReiserFS: dm-5: using ordered data mode

Nov 24 09:49:30 stoil ReiserFS: dm-5: journal params: device dm-5, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30,

max trans age 30

Nov 24 09:49:30 stoil ReiserFS: dm-5: checking transaction log (dm-5)

Nov 24 09:49:30 stoil ReiserFS: dm-5: Using r5 hash to sort names

ov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592634, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829440

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592638, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829441

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592634, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829440

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592638, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829441

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592770, limit=156301488

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829474

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592706, limit=156301488

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592710, limit=156301488

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592762, limit=156301488

Nov 24 09:49:30 stoil attempt to access beyond end of device

Nov 24 09:49:30 stoil sda: rw=0, want=312592766, limit=156301488

Nov 24 09:49:30 stoil ReiserFS: dm-3: found reiserfs format "3.6" with standard journal

Nov 24 09:49:30 stoil ReiserFS: dm-3: using ordered data mode

Nov 24 09:49:30 stoil ReiserFS: dm-3: journal params: device dm-3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30,

max trans age 30

Nov 24 09:49:30 stoil ReiserFS: dm-3: checking transaction log (dm-3)

Nov 24 09:49:30 stoil ReiserFS: dm-3: Using r5 hash to sort names

Nov 24 09:49:30 stoil Adding 4000144k swap on /dev/mapper/nvidia_cdebjcii5.  Priority:-1 extents:1 across:4000144k

```

What is the problem here?

10x!

----------

## DocReedSolomon

whats on sda4? win stuff?

if linux, did you already fsck the drive?

cfdisk reporting anything strange?

----------

## nixnut

```
Nov 24 09:49:30 stoil sda: p4 exceeds device capacity 

...

Nov 24 09:49:30 stoil Buffer I/O error on device sda4, logical block 46829440

Nov 24 09:49:30 stoil attempt to access beyond end of device 
```

Looks like your partition table is buggered. Check the size of the fourth partition on sda.

----------

## NeddySeagoon

stoil,

Your filesystem is broken. Your hard drive contains blocks numbered from 0 to 156301488 but something wants to read block 312592634 (and others) which are well off the end of your drive. This causes the read to fail. Whatever is on /dev/sda4 is probably corrupt. However, you are running kernel raid and dmraid, so whats really going on here?

Is it even valid to attempt to read /dev/sda4 directly at all ?

----------

## DocReedSolomon

wow neddy, you are always surprising me!

good one with the raid, didnt even realise that one   :Shocked: 

----------

## stoil

 *DocReedSolomon wrote:*   

> whats on sda4? win stuff?
> 
> if linux, did you already fsck the drive?
> 
> cfdisk reporting anything strange?

 

I have dmraid with 2 80GB SATA drives. cfdisk without params says:

 *Quote:*   

> FATAL ERROR: Bad primary partition 3: Partition ends after end-of-disk
> 
>                           Press any key to exit cfdisk
> 
> 

 

but

 *Quote:*   

> cfdisk /dev/mapper/nvidia_cdebjcii             

 

shows

 *Quote:*   

> 
> 
>                                  cfdisk 2.12r
> 
>                     Disk Drive: /dev/mapper/nvidia_cdebjcii
> ...

 

----------

## NeddySeagoon

stoil,

I guess (its still not clear) that you have /dev/sda and dev/sdb donated to nvidia dmraid.

If thats true then you are using BIOS dmraid level 0.

Reads to the underlying drives and partitions are not valid. You must only access them using dmraid.

cfdisk cannot make any sense of the drive partition tables directly. Indeed, only one drive will have a partition table at all.

It all looks good when you use dmraid through /dev/mapper/... 

From all that I believe that the error message about /dev/sda4 is in error, since you don't really have a /dev/sda4.

Yes, you can see it in /dev but you must not access it directly, its part of your dmraid raid set.

----------

## stoil

 *NeddySeagoon wrote:*   

> stoil,
> 
> I guess (its still not clear) that you have /dev/sda and dev/sdb donated to nvidia dmraid.
> 
> If thats true then you are using BIOS dmraid level 0.
> ...

 

Exactly - I have stripe with nvidia chipset raid. I don't expect that something access device directly but somehow it happens...

----------

## DocReedSolomon

 *stoil wrote:*   

> I don't expect that something access device directly but somehow it happens...

 

smartd running?

hdparm?

lm_sensors?

hddtemp?

----------

## NeddySeagoon

DocReedSolomon,

None of the applications in your list would try to read a partition and raw device access would still work for these applications.

stoil,

I suspect that /dev/sda was once used as a single drive and still contains a valid partition table from that time.

I don't know enough about dmraid to suggest you wipe the partition table. The kernel may be (mis)reading the dmraid partition table.

----------

## stoil

 *NeddySeagoon wrote:*   

> DocReedSolomon,
> 
> None of the applications in your list would try to read a partition and raw device access would still work for these applications.
> 
> stoil,
> ...

 

I received this PC with XP installed on RAID, then deleted all partitions and created partitions for gentoo, leaving some free space for future xp installation. It might be that from before something is wrong with first disk. I would appreciate any who can give information about this. However I don't exeperience any problems besides those messages in log during boot time, and because it's stripe raid I'm little bit woried about my data.

----------

## stoil

 *DocReedSolomon wrote:*   

>  *stoil wrote:*   I don't expect that something access device directly but somehow it happens... 
> 
> smartd running?
> 
> hdparm?
> ...

 

smartmontools - not installed

hparm is available here, but I haven't done anything intentionally with with, so I suppose it is not in use.

lm_sensors - the same as above.

hddtemp - not installed

----------

## DocReedSolomon

 *stoil wrote:*   

> 
> 
> hparm is available here, but I haven't done anything intentionally with with, so I suppose it is not in use.
> 
> 

 

why suppose? simply check:

```

/etc/init.d/hdparm status

```

i dont really think its hdparm either, though.. somehow we have to nail this error down, so its always good to remove anything (just for a test) that has to do with your hdd's.

----------

## DocReedSolomon

 *stoil wrote:*   

> 
> 
> I received this PC with XP installed on RAID, then deleted all partitions and created partitions for gentoo

 

just to make that sure.. you didnt create any partition using XP? you did all of that (deleting/adding partitions) using linux?

----------

## stoil

 *DocReedSolomon wrote:*   

>  *stoil wrote:*   
> 
> I received this PC with XP installed on RAID, then deleted all partitions and created partitions for gentoo 
> 
> just to make that sure.. you didnt create any partition using XP? you did all of that (deleting/adding partitions) using linux?

 

Yes, I did everything following gentoo handbook (slightly modified variant for dmraid case).

----------

## stoil

 *DocReedSolomon wrote:*   

>  *stoil wrote:*   
> 
> hparm is available here, but I haven't done anything intentionally with with, so I suppose it is not in use.
> 
>  
> ...

 

```

stoil stoil # /etc/init.d/hdparm status

 * status:  stopped

```

----------

## DocReedSolomon

 *stoil wrote:*   

>  *DocReedSolomon wrote:*    *stoil wrote:*   
> 
> I received this PC with XP installed on RAID, then deleted all partitions and created partitions for gentoo 
> 
> just to make that sure.. you didnt create any partition using XP? you did all of that (deleting/adding partitions) using linux? 
> ...

 

no, i meant, did you clean your partitions using linux?

you ran (c)fdisk, and both drives have been completly empty and showing full space?

so to speak: on both drives you removed all partitions using linux?

or did you leave one partition in, that had been created using windows?

----------

## NeddySeagoon

stoil,

I suspect you have the remmanants of a kernel raid install lying around. Can you post the output of 

```
fdisk -l
```

please.

If this were the case, the kernel is trying to start the kernel raid sets and failing because they are not there, although the partition table on one drive (at least) may show them.

fdisk -l lists the partition tables from all drives. It reads the MBRs and tries hard to make sense of them. A normal looking partition table on /dev/sda with partition type fd would cause the kernel to try to start kernel raid sets. The fix for that is to remove md support and the raid0 and raid1 personalties from your kernel.

----------

## stoil

 *NeddySeagoon wrote:*   

> stoil,
> 
> I suspect you have the remmanants of a kernel raid install lying around. Can you post the output of 
> 
> ```
> ...

 

```

stoil stoil # fdisk -l

Warning: ignoring extra data in partition table 5

Warning: ignoring extra data in partition table 5

Warning: ignoring extra data in partition table 5

Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Disk /dev/sda: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1           6       48163+  83  Linux

/dev/sda2               7        4759    38178472+   5  Extended

/dev/sda3            4760        7798    24410767+   7  HPFS/NTFS

/dev/sda4            7799       19458    93658950   83  Linux

/dev/sda5           84336      129518   362923087   9e  Unknown

Disk /dev/sdb: 80.0 GB, 80026361856 bytes

255 heads, 63 sectors/track, 9729 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

```

----------

## stoil

[quote="DocReedSolomon"] *DocReedSolomon wrote:*   

> 
> 
> no, i meant, did you clean your partitions using linux?
> 
> you ran (c)fdisk, and both drives have been completly empty and showing full space?
> ...

 

I didn't clear both disks as xp was allready on raid. I just cleared partitions on raid using cfdisk.

----------

## NeddySeagoon

stoil,

That looks harmless. One drive has a partition table, the other does not.

The numbers in the partition table clearly do not belong to s single drive partition layout, so thats your raid partition table.

None of the partition tables are of type fd, so I don't know why the kernel is trying to read /dev/sda4 as if it were a normal partition.

----------

