[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DVD "backup" trouble



Hi,

Reco wrote:
> xorriso somehow read the DVD contents in full.
> The question is - what did xorriso done differently?

It does it by talking nearly directly to the drive. Linux contributes
its ability to transport SCSI commands and bring back drive replies.
All other CD-ROM related brain of Linux gets circumvented.


> Is it a kernel bug, as it seems that the kernel determined DVD block
> device size incorrectly?

You may inquire what xorriso learns from the drive via above direct SCSI
execution and what it learns from the Linux block device driver, which
programs like dd are using:

  xorriso -outdev /dev/sr0 -toc 2>&1 | grep '^Media blocks'

  xorriso -outdev stdio:/dev/sr0 -toc 2>&1 | grep '^Media blocks'

Normally both sets of values should be the same. Like on DVD+RW:

  Media blocks : 2267648 readable , 27456 writable , 2295104 overall

Where "readable" means "with ISO 9660 filesystem data". "writable" means
"free space for another ISO session".

Another way to inquire the Linux kernel's idea of DVD size is

  $ lsblk -b -o SIZE -n /dev/sr0
  4700372992
  $ expr 4700372992 / 2048
  2295104


Have a nice day :)

Thomas


Reply to: