# DVD reading problem after first 4GB

## stigger

i have problems with reading DVD. when i'm trying to copy entire contents with mc or cp -- it copies, but until some limit (about ~4.1Gb). after that mc or cp reports "i/o error" and giving up. when that happens i see in dmesg:

```

attempt to access beyond end of device

hdb: rw=0, want=8701688, limit=8388604

Buffer I/O error on device hdb, logical block 2175421

attempt to access beyond end of device

hdb: rw=0, want=8701692, limit=8388604

Buffer I/O error on device hdb, logical block 2175422

attempt to access beyond end of device

hdb: rw=0, want=8701696, limit=8388604

Buffer I/O error on device hdb, logical block 2175423

```

and so on. but if i'm trying to use low-level tools to create image of dvd (dd or k3b) -- it works just fine, i have full iso image. so it's not hardware problem, it's something with software. but i have no idea what's wrong =( 

can anyone help me? why kernel uses incorrect limit for that dvd? i'm using 2.6.27-gentoo-r8 now, but i had the same problem on previous versions.

----------

## eccerr0r

Maybe the dvd image is corrupt?

Try copying the image to a hard drive and loopback mount the image?

----------

## stigger

 *eccerr0r wrote:*   

> Maybe the dvd image is corrupt?
> 
> Try copying the image to a hard drive and loopback mount the image?

 

no, image is fine. if i creating iso with k3b -- i can mount it and copy all files. and i can successfully read the very same dvd on my macbook.

it's really some software problem on my gentoo box.

----------

## eccerr0r

You successfully read the image back from the DVD on the afflicted computer and diffed it with the original image and they match?

----------

## stigger

 *eccerr0r wrote:*   

> You successfuly read the file back from the DVD and diffed it with the original image?

 

correct. k3b after burning successfully passes verification, if i'm creating ISO image from that dvd -- md5 is the same as for the original image.

----------

## eccerr0r

Is this a dual layer DVD-R?

I'm afraid my experience with dual layer DVDs is lacking, and not even sure how much testing has been done with DL-DVD-R...

----------

## stigger

 *eccerr0r wrote:*   

> Is this a dual layer DVD-R?
> 
> I'm afraid my experience with dual layer DVDs is lacking, and not even sure how much testing has been done with DL-DVD-R...

 

doesn't matter. problem appears both with single layer and dual layer dvds. in both cases reading stops near 4.1Gb limit.

----------

## eccerr0r

You know what... I think I saw this before or something like this before, and it afflicts only some Macbooks.  A friend of mine tried to read one of my burned DVDs and it failed reading it for whatever reason.  Maybe not though.

Since I don't own one I haven't really cared about debugging this further.  Do Macbooks use weird dvd hardware?

In any case it seems that it's thinking the disk ends at 8G LBA.  This isn't correct.  What version of the kernel are you using?  (or more specifically, is your udffs driver up to date?)  Also ... if you're using iso9660, i heard there are some limits with file size, did you exceed them?  Though this still sort of is strange...

You're using the same machine/burner to read back what you burned?

----------

## stigger

 *eccerr0r wrote:*   

> You know what... I think I saw this before or something like this before, and it afflicts only some Macbooks.  A friend of mine tried to read one of my burned DVDs and it failed reading it for whatever reason.  Maybe not though.
> 
> Since I don't own one I haven't really cared about debugging this further.  Do Macbooks use weird dvd hardware?

 

no, you misunderstood me.

1) i can successfully read disc on macbook with Mac OS

2) i can successfully make an iso image from that disc on my pc with gentoo

3) but i can't read entire content of disc on my pc with gentoo by simply copying it.

 *Quote:*   

> In any case it seems that it's thinking the disk ends at 8G LBA.  This isn't correct.  

 

i don't think it's 8G. that limit is some other blocks. and that part of log regards single layer dvd, so there is no 8G. 

 *Quote:*   

> What version of the kernel are you using?  (or more specifically, is your udffs driver up to date?)

 

kernel -- 2.6.27-gentoo-r8

how i can find udffs driver version?

----------

## stigger

 *eccerr0r wrote:*   

> Also ... if you're using iso9660, i heard there are some limits with file size, did you exceed them?  Though this still sort of is strange...

 

no. i'm using UDF. and i can successfully mount ISO with loop.

 *Quote:*   

> You're using the same machine/burner to read back what you burned?

 

yes. by the way, that problem has nothing to do with burning -- i have the same problem with ANY dvd disc.

----------

## tgR10

 *stigger wrote:*   

> [...]
> 
> 3) but i can't read entire content of disc on my pc with gentoo by simply copying it.
> 
> [...]

 

is it copy protected dvd ?

/edit

didn't saw this before

 *stigger wrote:*   

> [...]
> 
> yes. by the way, that problem has nothing to do with burning -- i have the same problem with ANY dvd disc.

 

so probobly it ain't copy protection ;/

----------

## pappy_mcfae

Turn on Support for large single files under Enable the block layer(NEW)

Blessed be!

Pappy

----------

## stigger

 *tgR10 wrote:*   

> so probobly it ain't copy protection ;/

 

no, there is no any copy protection.

 *pappy_mcfae wrote:*   

> Turn on Support for large single files under Enable the block layer(NEW)

 

"Enable the block layer" depends on "EMBEDDED", but my system is not embedded.

anyway, this has nothing to do with big files, because i have problems when i'm copying DVD-Video discs (all files not bigger than 1Gb).

----------

## pappy_mcfae

Whatever you say, dude. I can copy huge files between all my systems...in the range of 8 Gigs without any problem.

Good luck.

Blessed be!

Pappy

----------

## stigger

 *pappy_mcfae wrote:*   

> Whatever you say, dude. I can copy huge files between all my systems...in the range of 8 Gigs without any problem.

 

good for you, i've been googling hours and saw a lot of people with similar problem. something definely wrong.

----------

## eccerr0r

Ok, this likely will be the last post I will write on this topic.

I said 8G LBA, not 8GB.  If you look at the error block, it's very close to that boundary, hinting at some large device issue or driver issue, or some bit getting masked.

I'm afraid I'm on Pappy's side.  The attitude in this thread is turning me off from answering further despite the somewhat interesting boundary issue that's occurring here.  There were some details that are not clear from reading (at least the way it's worded it's not clear.)  And this problem is only appearing on certain machines or certain hardware - would be nice to know exactly what machine (host adapter), and hardware (model of dvd reader and burner/source media (pressed disc vs recordable, dual layer, video vs data?)).  I have not burned a DVD in a long while but when it did work, it worked just fine and I was able to read everything back (these are pure data dvds), all 4.7GB.

I use growisofs to burn DVDs, and have multiple burners/readers (two Samsung dual layer burners, a Lite-On +/-, Pioneer +/-, and Sony reader), and other than bad burns, they are interchangeable.  At least this was the case a few months back.  You might want to try downgrading kernels to 2.6.21 to 2.6.24 as a test as those versions I've had no issues with.

----------

## Art Vandalay

hey guys,

i've noticed i'm also experiencing the same issue....ie basically it appears i'm unable to read files off a data dvd past a certain limit (ie about the 4gb mark)....similar to what stiggler is experiencing.

the size of the file isn't a problem....it appears to do with where it's located on the dvd.

the problem dvd's in question are blank double layer dvd-r that i burned via k3b (ie a data dvd consisting of files from 1mb to 400mb max in size)

I tried Pappy's suggestion and enabled Large File Support in the kernel, but to no avail.

Here is a snippet of the errors in syslog:

```
Mar 13 17:53:08 calista kernel: hda: rw=0, want=16178048, limit=8388604                                                                                                           

Mar 13 17:53:08 calista kernel: attempt to access beyond end of device                                                                                                            

Mar 13 17:53:08 calista kernel: hda: rw=0, want=16177924, limit=8388604                                                                                                           

Mar 13 17:53:08 calista kernel: attempt to access beyond end of device                                                                                                            

Mar 13 17:53:08 calista kernel: hda: rw=0, want=16177928, limit=8388604 
```

my cd/dvd burner is as follows:

```
calista ~ # cd-info

cd-info version 0.80 i686-pc-linux-gnu

Copyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE.

CD location   : /dev/cdrom

CD driver name: GNU/Linux

   access mode: ioctl

Vendor                      : PIONEER

Model                       : DVD-RW  DVR-110

Revision                    : 1.22

Hardware                                  : CD-ROM or DVD

Can eject                                 : Yes

Can close tray                            : Yes

Can disable manual eject                  : Yes

Can select juke-box disc                  : No

Can set drive speed                       : No

Can read multiple sessions (e.g. PhotoCD) : Yes

Can hard reset device                     : Yes

Reading....

  Can read Mode 2 Form 1                  : Yes

  Can read Mode 2 Form 2                  : Yes

  Can read (S)VCD (i.e. Mode 2 Form 1/2)  : Yes

  Can read C2 Errors                      : No

  Can read IRSC                           : Yes

  Can read Media Channel Number (or UPC)  : Yes

  Can play audio                          : Yes

  Can read CD-DA                          : Yes

  Can read CD-R                           : Yes

  Can read CD-RW                          : Yes

  Can read DVD-ROM                        : Yes

Writing....

  Can write CD-RW                         : Yes

  Can write DVD-R                         : Yes

  Can write DVD-RAM                       : Yes

  Can write DVD-RW                        : No

  Can write DVD+RW                        : No

----------

## stigger

Art Vandalay

that's exactly the same problem -- limit is the same.

my drive — _NEC DVD_RW ND-3500AG.

----------

## eccerr0r

It looks like both of you are using legacy cdrom/ide drivers by guessing from hda/hdb.  Does the SATA/libATA drivers exhibit the same problem?  It should show up as scdX if all your drivers are setup properly..

PATA CDROMs can be run under the libATA driver.  The only exception is that I think IA64 PIIX4 doesn't seem to work with libATA.  YMMV as usual.

This isn't a fix if it actually works -- this is a workaround.  If it does, then we know the problem is in the legacy PATA driver.

BTW: All my tests were under the USB and USB-IDE-SCSI mass storage driver, so this may be the missing link - bad legacy PATA driver.

----------

## stigger

eccerr0r

sorry for the lame question, but how can i switch the driver?

----------

## eccerr0r

I don't know what you're using for primary (hard) disks, but I suspect that both of you are using SATA or SCSI primary disks already.  Likely the PATA CDROM/DVD drives being used are simply hanging off a different controller; just select the libATA controller that corresponds to the controller you have.  Some of these drivers may be experimental still; but one thing that you must do is disable legacy PATA support; legacy PATA support for your PATA CDROM will trump libata/SATA support.

Then make sure SCSI CDROM drivers are compiled in.

Then try again with /dev/scdX and see if it works.

My laptop uses a parallel CD/DVDROM and I'm usually using IDE-SCSI, and oddly enough it seems to work fine.  I'm still using all-legacy disk controller driver on that machine.

----------

