Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm archiving my media collection onto BD-R Dual Layer discs but keep getting the following IO errors at the end of the writing process (usually > 95% complete) :

:-[ WRITE@LBA=168e800h failed with SK=5h/END OF USER AREA ENCOUNTERED ON THIS TRACK]: Input/output error
:-( write failed: Input/output error
/dev/sr0: flushing cache
/dev/sr0: closing track
/dev/sr0: closing session
:-[ CLOSE SESSION failed with SK=5h/INVALID FIELD IN CDB]: Input/output error
/dev/sr0: reloading tray 

My archiving process is detailed below:

  1. dirsplit -m -s 46G /path/to/folder > divides the original 61G folder into two folders whose size is <= 46GB. (Blu-Ray DL capacity being 50050629632 bytes == 46.61GB)
  2. genisoimage -ldots -allow-lowercase -allow-multidot -d -iso-level 4 -l -o /path/to/file.iso /path/to/folder > generates an iso image which is compatible with OS X folder structure and filenames.
  3. growisofs -Z /dev/sr0=/path/to/file.iso > writes iso image to Blu-ray disc.

The interesting thing is that I am able to successfully mount and read from the burned disc, even though growisofs failed to close the session. But I'm not sure wether all of the data was written to the disc.

I compared the md5 checksums of both the disc and the img file (thanks to a nifty tip from ewindisch over at Unix&Linux) but the two strings did not match. The output from dd said that the disc was 48GB in size rather than the 46GB image that was written to it.

However, running cmp -b -l /path/to/image.iso /dev/sr0 returned cmp: EOF on /dev/sr0 which means that the disc image is smaller than the iso file.

So as far as I can tell, growisofs partially wrote the image to the disc but stopped short for some reason. Although I can mount the "incomplete" disc, I need to find why the burning stopped short.

Can anyone point me in the right direction? I can't find any records in /var/log/* written by growisofs and can only go on the cryptic output at the top of this page.

share|improve this question


I experienced the exact same problem when burning an iso image of 50,011,897,856 bytes, which is only 37.8MB smaller than the maximum Blu-ray DL capacity you mentioned (50050629632 bytes).

Here is what solved the problem in my situation:

 growisofs -use-the-force-luke=spare:none -dvd-compat -overburn -Z /dev/sr0=/path/to/file.iso

I suspect that the -overburn parameter was not necessary, but I cannot tell that for certain because I have not tried burning a disc without this parameter. Those BD-R DLs are kinda expensive. The -dvd-compat parameter makes growisofs close track/session/disc to make it more compatible with some Blu-ray players that do not like multisession discs.

The poorly documented -use-the-force-luke=spare:none parameter appears to be the key parameter to solve the problem. It instructs growisofs to not pre-format the blank BD-R media. Pre-formatting the media instantly takes up 256MB of disc space for defect management.

So now instead of getting the dreaded :-[ CLOSE SESSION failed at about 95-96% of disc burning process, I get this:

49979686912/50011897856 (99.9%) @4.0x, remaining 0:01 RBU  96.0% UBU  51.1%
builtin_dd: 24419872*2KB out @ average 3.9x4390KBps
/dev/sr0: flushing cache
/dev/sr0: closing track
/dev/sr0: closing session
/dev/sr0: reloading tray
share|improve this answer
Thanks for the tip @Beef, I'll let you know how it turns out after giving it another go. – danielcraigie Apr 1 '13 at 12:12

As Beef Eater's answer mentioned, this is caused by the defect management "spare area" taking up 256MB of space, meaning that your UDF filesystem image will no longer fit on the disk. There are two things you can do about this:

  1. Reduce the size of the image accordingly, and benefit from the built-in defect management required by the Blu-Ray specification (albeit at a 50% cost to write speed). You can find out the actual writable space on a media listed several times in the output of dvd+rw-mediainfo, e.g.:

    $ dvd+rw-mediainfo /dev/dvd
     formatted:             11826176*2048=24220008448
     Track State:           complete
     Track Start Address:   0*2KB
     Free Blocks:           0*2KB
     Track Size:            11826176*2KB
    READ CAPACITY:          11826176*2048=24220008448

    This tells you that there is 11826176*2KB = 23652352 KB of space available on the disk, which you can then use as input to your splitting or image-creating tools, e.g.

    $ truncate -s 23652352K my_image.udf
    $ mkudffs my_image.udf
    ... fill up the image etc ...
  2. Disable the defect management on the drive and remove the sparing area, which will allow you to write the disk at full speed to its full capacity. This can be done using the dvd+rw-format tool as documented here, e.g.

    $ dvd+rw-format /dev/dvd -ssa=none

    Since there will be no defect management in this situation, you might want to verify the disk manually after writing it, for example using the diff -r command.

share|improve this answer

I have some comment and thanks for that HELP.I have wasted many a coaster with k3B.It DOES support BDROM sized images but apparently uses the SPARE area even though it "forces LUKE" a lot with its burn options. K3B needs this option because it errors out at the 99% mark(Im on single layered discs right now). xfburn 0.5.2 works well without any options but is only available on Debian Jessie(8) and above.(UBUNTU 15+ series also, but that has its own set of other bugs.Not recommending Jessie on anyone until they fix the zip/arkwriter bug that corrupts data.I found this one out the hard way with a loss of backup set.FEDORA seems to have itself in a niche and no bug detected so far, even though Im running same Linux apps[source code] that Jessie has.) I would LOVE to use K3B out of the box with BDROMS IFF it worked.

share|improve this answer
This does not answer the author's question. This by your own words is a comment. – Ramhound Jun 9 '15 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .