growisofs warnings when writing to Blu-ray Dual Layer discs

5

2

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.

danielcraigie

Posted 2012-08-17T10:22:13.153

Reputation: 2 451

Answers

4

@danielcraigie:

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

Beef Eater

Posted 2012-08-17T10:22:13.153

Reputation: 171

This worked for me without needing -overburn on a single layer BD-R. K3B claimed the disc wasn't large enough even though it was. I'm guessing not leaving the 256 MB to spare was the reason. – user369450 – 2017-12-14T15:39:32.923

Thanks for the tip @Beef, I'll let you know how it turns out after giving it another go. – danielcraigie – 2013-04-01T12:12:41.553

2

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
    ...
    READ FORMAT CAPACITIES:
     formatted:             11826176*2048=24220008448
    READ TRACK INFORMATION[#1]:
     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.

user89061

Posted 2012-08-17T10:22:13.153

Reputation:

1

My burns to 25GB Blu-ray disks were also ending with the error:

:-[ CLOSE SESSION failed with SK=5h/INVALID FIELD IN CDB]: Input/output error

on 'Ubuntu 14.04 LTS trusty' when I ran this command:

growisofs -Z /dev/sr1 -V "BD_Disk_Name" -R -iso-level 3 "/path/to/directory/to/burn"

I was unwilling to use the

-use-the-force-luke=spare:none

solution because I didn’t want to give up error checking.

It appears that this is a known bug (I don't have the rep to add the link, but it is at bugs dot debian dot org number 713016) which has been patched in 'dvd+rw-tools 7.1-11'. Unfortunately for me that version is not available on '14.04 LTS trusty', but it is available on 'vivid'.

So if you happen to find yourself in the same boat, here's how I got the newer version.

Elsewhere it was suggested to use "pinning" in order to get software from newer releases, but I didn’t try that as this page, which describes how to do it, suggests it can be problematic and recommends a better alternative to pinning. Sadly for me they left out a step, so here's what I found worked:

You should 'cd' to where you want the build files to end up.

Edit this list to add a 'deb-src' for the release that has what you need:

nano /etc/apt/sources.list

In my case I added this line to the 'sources.list':

deb-src http://archive.ubuntu.com/ubuntu vivid main restricted universe multiverse

Then do 'update':

sudo apt-get update

Then get the dependencies:

sudo apt-get build-dep dvd+rw-tools

Now you can get the source:

apt-get -b source dvd+rw-tools=7.1-11

Install 'dvd+rw-tools_7.1-11_i386.deb':

dpkg --install dvd+rw-tools_7.1-11_i386.deb

However this didn’t install the new version of 'growisofs', so I had to run this (perhaps if I had run this first it would of installed everything?):

dpkg --install
(Reading database ... 62345 files and directories currently installed.)
Preparing to unpack growisofs_7.1-11_i386.deb ...
Unpacking growisofs (7.1-11) over (7.1-10build1) ...
Setting up growisofs (7.1-11) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...

Confirm the newer version of 'growisofs' is installed:

dpkg -s growisofs

Package: growisofs
Status: install ok installed
Priority: optional
Section: video
Installed-Size: 202
Maintainer: Optical Media Tools Team <pkg-opt-media-team@lists.alioth.debian.org>
Architecture: i386
Source: dvd+rw-tools
Version: 7.1-11
Replaces: dvd+rw-tools (<< 7.1-9)
Depends: libc6 (>= 2.4), libstdc++6 (>= 4.1.1)
Breaks: dvd+rw-tools (<< 7.1-9)
Description: DVD+-RW/R recorder
[...]

Enjoy burning to Blu-ray disks!

Steph

Posted 2012-08-17T10:22:13.153

Reputation: 11

0

I also encounter problems when writing BD DL 50GB disks. Only these. There is no problem when writing CD-R(W), DVD-R(W), DB-R SL 25GB. I am working on FreeBSD.

After some research I noticed that it is important to verify the EXACT DISK TYPE and FIRMWARE of the recorder! New firmware can support new disks and handle them better. Some recorders provide a "Media Compatibility List" that may change with a Firmware version. Disks have different technologies and versions, imagine that? ;-)

My Pioneer BDR-208D FW1.20 stopped exactly in the middle of BD-R DL disk. After firmware upgrade to FW1.50:

  • ISO burning breaks randomly with Verbatim BD-R DL 50GB MABL V1.3 disks.
  • ISO burning works fine with Verbatim BD-RE DL 50GB SERL V2.1 disk.

Note: I am not really burning ISO but GPG encrypted backups directly on the disk. It works fine for BD-R SL (25GB) media.

The -use-the-force-luke=spare:none does not seem to help and not really necessary in my case. Images are a bit smaller than 50GB (around 46..47GB each).

I will soon buy a ASUS BW-16D1HT that has the best firmware update rate and will report back with the same disk.

Update 1: I just got the ASUS BW-16D1HT FW3.10. It supports new BDXL 100GB media. It supports new M-DISK (ultra long life for backups). Hope it will handle those Verbatims..

  • Using factory brand new BD-R DL 50GB MABL V1.3 disk as previously.
  • Pre-formatting completed, but then, as with Pioneer, WRITE@LBA=390h failed with input/output error.
  • Restarting the same command started write. Let's see if that completes. Pioneer did have interrupts in the middle of the disk (FW1.20) or random places (FW1.50). ASUS seems to have higher average write speed of 0,6..0,7x while Pioneer had big fluctuations 0,0..0,6x.

Update 2:

  • There was no problem with burning Verbatim BD-R DL 50GB MABL V1.3 (nominal write speed 6x) on ASUS BW-16D1HT Firmware 3.10 at speed 2x given explicitly as -speed=2 parameter to growisofs.
  • Burning at speed 8x (auto-detected by burner, no speed parameter given) did end up with error at random location. Re-trying operation puts burner in non-operation-busy state and lots of CAM errors in DMESG.
  • It looks like some disks are simply not compatible with some burners.
  • It looks like those two layer disks are extremely sensitive to write speed. Maybe this is a problem of the Disk Technology itself if similar problems occur on different devices and firmware revisions.

CONCLUSIONS:

  1. VERIFY DISK TYPES AND YOUR BURNER VENDOR + FIRMWARE VERSION.
  2. THERE ARE LOTS OF VARIANTS OF BLU-RAY DISKS IN DIFFERENT VERSIONS AND MANUFACTURING TECHNOLOGIES.
  3. NOT ALL OF THE DISKS AND BURNERS COOPERATE WELL OR COOPERATE AT ALL!
  4. USE LOWEST POSSIBLE WRITE SPEED TO BD DL DISKS. THEY ARE EXTREMELY SENSITIVE TO WRITE FLUCTUATIONS AND BUFFER UNDERRUNS ON ALL BURNERS (EVEN THOUGH THOSE BURNERS HAVE A BUFFER THAT SHOULD PREVENT THAT).

CeDeROM

Posted 2012-08-17T10:22:13.153

Reputation: 51