hdiutil burn problem and permissions

jpollock

Registered
Hi all,

So a while back I wrote an Applescript to handle our office backups, and among other things it uses mount_smbfs to grab some mall folders off of individual machines and copy them to the file server. After everything is on the file server, the script calls hdiutil to make an image file and burn it to DVD. This was all working swimmingly until about a week ago, when it suddenly broke, even though there have been no changes to our infrastructure that I'm aware of. Hdiutil still creates the .dmg file without issue, but when it tries to burn it, it generates the following error:

diutil: Burn started, Sun Oct 7 12:14:45 2007
hdiutil: Burning to DVD-R media with DAO strategy in MATSHITA DVD-R UJ-85J FEW7 via ATAPI.
hdiutil: Requested burn speed was 47x, actual burn speed is 8x.
hdiutil: Burn underrun protection is supported, and enabled.
hdiutil: Burn failed, Sun Oct 7 12:14:45 2007
hdiutil: Burn sense: 5/24/00 Illegal Request, Invalid field in CDB
hdiutil: Burn error: 0x80020022 The device failed to respond properly, unable to recover or retry.

At first, I was worried that there was a physical problem with the drive, but I ascertained I was able to manually burn a folder to the DVD without a problem. I then further ascertained that I was able to burn the entire backup to DVD without incident if I excluded the mail folders from the creation of the .dmg file. So there's something in one of those mail folders that the burn function of hdiutil apparently doesn't like (even though it can create the .dmg file with the mail folders included). My guess is that it's the permissions, but a quick glance reveals that the user that runs the backup script has at least rw access (but not necessarily execute access) to all folders within the mail folders. Does anyone have any ideas as to what might be the problem?

Cheers,
John
 
Followup: I tried creating a .dmg file of just the mail folders and burning it, and that worked ok. So now I'm baffled. I wonder if it's a size issue: when altogether, the files amount to a 3.83 GB .dmg file, but that shouldn't be too large for an 8GB DVD.

Any thoughts will be appreciated.
 
This error ("Invalid field in CDB") seems to indicate a burn error, which would explain why it is broken when nothing has changed. You should:
a. try different media
b. clean the burner (compressed air, special disk cleaner)
c. get a new burner

edit: looks like you've already burned different files successfully. However, I would still try the above (at least a & b). Were the successful burns the same size?
 
It does not appear at this point to be a physical problem with the drive or the DVDs, as a) I can successfully burn individual folders to DVDs without issue, and b) when it fails, it does so *immediately*, as if it scanned the .dmg file and decided right away that there was something wrong with it. I'm still experimenting with different combinations to see if I can find the trouble, but my fear is that it had something to do with the size of the .dmg file. The one I had trouble with was 3.83 GB. I just made a 2.5 GB image and am trying to burn it to see if that's the trouble. The DVDs I'm using have a 4.7 GB capacity, so 3.8 GB shouldn't be an issue unless hdiutil requires a certain amount of extra free space while doing the burn (and if anyone knows anything about that, I'd be appreciative).
 
Another update: the 2.5 GB .dmg file burned without issue, so it does appear that the problems were related to the size of the prior .dmg file. This makes sense, since our backups had worked fine before until our fileserver had an extra 1GB of data added to it overnight. But why can a 3.8GB image not fit on a 4.7GB disk? Does the disk need to have a certain amount of extra free space?
 
You should be able to burn under 4.4 GB without issue. Try creating a DMG this size without your applescript. It could be that the burner is just having trouble with the outer tracks of the DVD (re: larger file sizes), and this part of the burner is having problems.
 
Back
Top