bug-xorriso
[Top][All Lists]
Advanced

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

Re: [Bug-xorriso] How to write 27G file to BD-R D


From: Thomas Schmitt
Subject: Re: [Bug-xorriso] How to write 27G file to BD-R D
Date: Tue, 20 Dec 2016 18:40:42 +0100

Hi,

and welcome. Requests for help are well appropriate here.

Andrew Fraser wrote:
> I have a single compressed file from a zfs snapshot that I want to write
> to a double sided Blu-Ray disc.
> ...
> -rw-r--r-- 1 root root 28927582844 Dec 19 08:52 check_size.lz
> ...
> # time xorriso -as cdrecord -v dev=/dev/dvdrw blank=as_needed 
> /mnt/big/check_size.lz

This wrote the file as plain data stream onto the medium.
You may verify the exactness of the copy by reading the number of written
bytes and comparing them with the original file.

Regrettably 28927582844 = 2 * 2 * 7231895711 contains a large prime
which makes it hard to truncate the stream by help of program dd.
Reading has to be done in larger chunks. But cutting will work only
in chunks of 4 bytes. So you may try this:

  dd if=/dev/dvdrw bs=64K count=441400 | \
  dd bs=4 count=7231895711 | \
  diff - check_size.lz

which is puts much load onto the CPU, i fear.

Or if you have enough buffer space on disk, do

  dd if=/dev/dvdrw bs=64K count=441400 of=readback.lz
  truncate -s 28927582844 readback.lz
  diff readback.lz check_size.lz


> # time lz4c -d /dev/dvd decompress
> Error 67 : Unfinished stream
> real    0m3.285s

Quite an early end of stream. Did you already try hiding the file type
of the data source ?
If i understand http://www.manpagez.com/man/1/lz4c/ correctly, this could
work:

  cat /dev/dvd | lz4c -d - decompress

Command "cat" is important here, because "lz4c ... </dev/dvd" would still
be able to see that the input is a block device file.
(This gives hope for success only if above checkreading indicates a
 flawless copy.)

------------------------------------------------------------------

As you can see, a plain data stream on BD media is not the best form
at read time.
Consider to let xorriso wrap the file into an ISO 9660 filesystem

  xorriso -for_backup -outdev /dev/dvdrw -fs 64m \
          -map /mnt/big/check_size.lz /check_size.lz \
          -commit_eject all

Checkreading can then be done after mounting /dev/dvdrw. E.g.

  mkdir /mnt/bd
  mount /dev/dvdrw /mnt/bd
  diff /mnt/bd/check_size.lz /mnt/big/check_size.lz

Maybe lz4c is more happy with it then.

  lz4c -d /mnt/bd/check_size.lz decompress

At least it will appear as regular file with size 28927582844 bytes.

------------------------------------------------------------------

> # growisofs -speed=1 -Z /dev/dvd=/mnt/big/check_size.lz
> ...
> builtin_dd: 14124784*2KB out @ average 0.9x4390KBps
> :-( write failed: Invalid argument

Looks as if growisofs did not align to an integer number of BD chunks:
14124784 / 32 = 441399.5
But i cannot tell whether this caused the error message.

I did not spend money yet on buying 50 GB media.

  
Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]