Hi Thomas,

Thank you for your responses.  It is looking like we will go with xorriso, at 
least we will if I have anything to say about it.  One last question, and then 
I will stop clogging up the list:

Can xorriso toggle the drive tray?  That is, is there a xorriso equivalent of 
eject -T?  Not that it matters: I can just use eject -T (on drives where this 
is an option).  I was only curious, since the status doesn't seem to report 
whether the drive is open or closed.

Thank you for all your help,

-Eric J. Richardson

-----Original Message-----
From: Thomas Schmitt [mailto:[email protected]] 
Sent: Thursday, May 14, 2015 12:47 AM
To: [email protected]
Cc: Richardson, Eric J
Subject: EXTERNAL: Re: Problem with growisofs -- cannot write multisession DVDs 
without ejecting and reloading tray

Hi,

> > The new session adds a new superblock,

> I was thinking that the entire DVD had one superblock at the 
> beginning, and that couldn't be right, because how would it get 
> updated?

This is the situation with overwritable media:
DVD+RW, DVD-RAM, BD-RE, formatted DVD-RW, formatted CD-RW,
data files, Linux block devices.

The new session gets written like with sequential media (CD-R, CD-RW, DVD-R, 
DVD+R, BD-R, unformatted DVD-RW) but the superblock at block offset 0 gets 
overwritten to lead the mounters to the youngest session.
xorriso by default creates the superblock of the first session at offset 32 and 
a copy at offset 0. This way the superblock at offset 32 survives the updates 
at offset 0 when more sessions get burned.


> I am trying to figure out if I can close a DVD without writing a new 
> file to it.

Interesting use case. I don't think that my stuff can do this. But i dimly 
remember that growisofs ...
man 1 growisofs, EXAMPLES:

"To finalize the multi-session DVD maintaining maximum compatibility:
    growisofs -M /dev/dvd=/dev/zero
"
(I never tried this.)


> xorriso -dev /dev/sr1 -status short

Command -status will tell you the current settings of various xorriso commands, 
but nearly nothing about the medium state.

The info about the number of sessions is put out on stderr after a drive was 
aquired by -dev, -indev, or -outdev.

  $ xorriso -outdev /dev/sr2  2>&1 | grep '^Media summary:'
  Media summary: 129 sessions, 8597504 data blocks, 16.4g data, 7074m free

The command -toc puts out the line "Media summary:", too.
Its output goes to stdout. Its line "Media blocks :" gives exact sizes counted 
in units of 2048 bytes.

  $ toc=$(xorriso -outdev /dev/sr2 -toc 2>/dev/null)
  $ echo "$toc" | grep '^Media blocks :'
  Media blocks : 8597504 readable , 3621888 writable , 12219392 overall
  $ echo "$toc" | grep '^Media summary:'
  Media summary: 129 sessions, 8597504 data blocks, 16.4g data, 7074m free


> is there a way to get the number of session left for the medium?  
> Short of manually subtracting the number of sessions on the disk from 
> 99, that is.

Not yet. The numbers 99 and 153 are theoretical values.
The real number of remaining sessions depends on the size of those sessions and 
on the gaps between sessions.

With BD-R there is no limit announced in the MMC specs.
My oldest BD burner can put more than 300 on the medium before it fails quite 
miserably. My younger ones throw error after about 120 to 140 sessions. (I am 
awaiting the refusal of my current backup BD-R every day.) For professional 
purposes i would impose a limit of 100 sessions and then just begin with a new 
medium.


Have a nice day :)

Thomas


--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: 
https://lists.debian.org/[email protected]

Reply via email to