0

I am writing files to a DVD with growisofs once a day. Each time I append to the DVD, I have to eject the DVD and then re-load the DVD in order to see the file I just wrote. I am using RHEL 5.0 and to initialize a blank DVD, I use the command:

growisofs -Z /dev/dvd -rJ -use-the-force-luke=notray file1

which will write file1 to the DVD. Next, I will try to write file2 to the DVD (without ejecting the DVD in between) with the command:

growisofs -M /dev/dvd -rJ -use-the-force-luke=notray file2

and that will fail with the error:

"/usr/bin/mkisofs: Invalid argument. Seek error on old image

: - ( mkisofs has failed: 22"

If I eject and then try the growisofs -M command again, it will successfully write file2 but if I try to write file3, file3 will fail with the same error.

I remember reading some where (might have been a man page) that in between burn sessions you might have to eject and re-load the DVD, however, I did not have this problem with non-Blue-Ray compatible drives.

Even if this is a problem with the Blue-Ray drives I have been trying, is there a way to simulate an eject without actually ejecting a disc? Or some other way to work around this without having to physically eject the DVD? I can't do an eject -T because it is a laptop drive, so the drive cannot close under its own power.

Any help or ideas would be greatly appreciated. I have looked at ioctl commands such as:

ioctl(file_descriptor, CDROMSTART)
ioctl(file_descriptor, CDROMSTOP)

but I haven't looked at many other commands or found a command that solves my problem... yet

Thanks.

3 Answers 3

1

The eject is required by some drives -- it forces them to reread the contents of the disc after a burn session has changed those contents. It's a hardware thing, so to fake it you'd need to convince the drive that it's just loaded a new media and needs to perform its initial scan of that new media.

I don't know if this is possible via standard IOCTLs -- I'd expect you'd have to hack the drive firmware (and possibly add your own special IOCTL to the driver code) to do it.

1
  • It definitely isn't what I wanted to hear, but I think you are right about having to modify the firmware. Thanks!
    – Kevin S.
    Jan 4, 2010 at 20:01
2

The ioctl CDROMRESET seems to force the TOC of device to be re-read by the system. You can try it to your probleme, I think this should work

1

Power the device down and back up.

  • find the scsi device id via "lsscsi -v"

  • cd /sys/bus/scsi/drivers/sr

  • echo the scsi id to unbind, then bind.

    echo "1:0:0:0" > unbind
    echo "1:0:0:0" > bind
    

You must log in to answer this question.

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