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

Re: COMMAND SEQUENCE ERROR when reading from pipe or stdin



On Mon, 21 Feb 2005 13:18:24 +1100, Mitch Davis wrote
> Hello,
> 
> I'm trying to use growisofs to write data to a
> blanked DVD-RW.  If I point growisofs at an image
> file, everything works properly.  But if I pipe in
> the image file via stdin or a named pipe, the
> write fails with the message "COMMAND SEQUENCE ERROR".

Hello,

Thank you to everyone who replied.

James Finnall <james@finnall.net> wrote:
>
> I use the program sdd to write directly to the drive.  I have used this 
> method a great deal under kernel 2.4 with a kernel patch.  But I have only 
> tested my own system at this point on 2.6.10 and no kernel patch.
>
> /bin/tar -cz some_files  | /usr/local/bin/sdd of=/dev/raw/raw1 obs=32k
>
> Please note that it uses the raw device and sets the output buffer size to 
> 32k.  The raw device needs to bound the drive to be used like this:
>
> raw /dev/raw/raw1 /dev/dvd_drive_to_use

That's a sweet idea, I'd like to try it.  I got sdd 1.52 and compiled
it.  The problem is, FC3 no longer has (or needs) the "raw" command:

  http://www.edhanced.com/ask-mred/?q=node/view/82

Instead, apps should call open() with the O_DIRECT flag, which
sdd doesn't use.  I had a look at the sdd source with a view to
adding a flag to use O_DIRECT, but the prototype for the
getallargs() fn has (literally) 57 arguments.  I'm not sure I
want to mess with it.  

Jörg, if you're reading this, would you consider a version of
sdd which has an option to cause open() to use the O_DIRECT flag?

An alternative might be for me to apply the following patch to
dd, which adds support for open() with O_DIRECT:

  http://marc.theaimsgroup.com/?l=linux-kernel&m=108135935629589

Has anyone tried this?

Things are certainly not going to work with dd as things stand:

[root@homer /]# dd if=/home/050221-sys.tar.gz of=/dev/hdc obs=32k
dd: opening `/dev/hdc': Read-only file system

Bill Davidsen <davidsen@tmr.com> wrote:
>
> Since you are running FC3, you could run the cdrecord
> which comes with the release. I haven't had any problems
> with it. YMMV.

My mileage IS varying.  I want to stream to the recorder,
not burn a pre-existing image.  Ok, I'll try with an image
first.  I guess I have a choice of TAO or SAO (DAO maps to
SAO on this drive).

Let's try TAO:

[root@homer /home/mjd]# cdrecord dev=ATA:1,0,0 driveropts=burnfree -tao - 
< /home/050221-sys.tar.gz
Cdrecord-Clone 2.01a27 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg 
Schilling
NOTE: this is OSS DVD extensions for cdrtools and thus may have bugs
   related to DVD issues that are not present in the original cdrtools. For
   more information see http://crashrecovery.org/oss-dvd.html. The original
   cdrtools author should not be bothered with problems in this version.
scsidev: 'ATA:1,0,0'
devname: 'ATA'
scsibus: 1 target: 0 lun: 0
Warning: Using badly designed ATAPI via /dev/hd* interface.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - 
Red Hat-scsi-linux-sg.c-1.80-RH '@(#)scsi-linux-sg.c        1.80 04/03/08 
Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'TEAC    '
Identifikation : 'DV-W50E         '
Revision       : '1.30'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: Found DVD media: using cdr_mdvd.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
cdrecord: Drive does not support TAO recording.
cdrecord: Illegal write mode for this drive.


Let's try DAO (which maps to SAO) with an image:

[root@homer /home/mjd]# cdrecord dev=ATA:1,0,0 driveropts=burnfree -dao - 
< /home/050221-sys.tar.gz
Cdrecord-Clone 2.01a27 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg 
Schilling
NOTE: this is OSS DVD extensions for cdrtools and thus may have bugs
   related to DVD issues that are not present in the original cdrtools. For
   more information see http://crashrecovery.org/oss-dvd.html. The original
   cdrtools author should not be bothered with problems in this version.
scsidev: 'ATA:1,0,0'
devname: 'ATA'
scsibus: 1 target: 0 lun: 0
Warning: Using badly designed ATAPI via /dev/hd* interface.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - 
Red Hat-scsi-linux-sg.c-1.80-RH '@(#)scsi-linux-sg.c        1.80 04/03/08 
Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'TEAC    '
Identifikation : 'DV-W50E         '
Revision       : '1.30'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: Found DVD media: using cdr_mdvd.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
Starting to write CD/DVD at speed 2 in real SAO mode for single session.
Last chance to quit, starting real write    0 seconds. Operation starts.
trackno=0
Turning BURN-Free off
cdrecord: Turning BURN-Free on
cdrecord: WARNING: Drive returns wrong startsec (0) using -150

WARNING: padding up to secsize.
Track 01: Total bytes read/written: 1312469667/1312471040 (640855 sectors).


Let's try the same data, but streamed (cdrecord won't be able to seek):

[root@homer /home/mjd]# cat /home/050221-sys.tar.gz | cdrecord dev=ATA:1,0,0 
driveropts=burnfree -dao -
Cdrecord-Clone 2.01a27 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg 
Schilling
NOTE: this is OSS DVD extensions for cdrtools and thus may have bugs
   related to DVD issues that are not present in the original cdrtools. For
   more information see http://crashrecovery.org/oss-dvd.html. The original
   cdrtools author should not be bothered with problems in this version.
scsidev: 'ATA:1,0,0'
devname: 'ATA'
scsibus: 1 target: 0 lun: 0
Warning: Using badly designed ATAPI via /dev/hd* interface.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
cdrecord: Warning: using inofficial libscg transport code version (schily - 
Red Hat-scsi-linux-sg.c-1.80-RH '@(#)scsi-linux-sg.c        1.80 04/03/08 
Copyright 1997 J. Schilling').
Device type    : Removable CD-ROM
Version        : 0
Response Format: 2
Capabilities   :
Vendor_info    : 'TEAC    '
Identifikation : 'DV-W50E         '
Revision       : '1.30'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: Found DVD media: using cdr_mdvd.
Using generic SCSI-3/mmc DVD-R(W) driver (mmc_mdvd).
Driver flags   : SWABAUDIO BURNFREE
Supported modes: PACKET SAO
cdrecord: Track 1 has unknown length.
cdrecord: Use tsize= option in SAO mode to specify track size.

Obviously I can't specify tsize because I don't know ahead
of time what the size will be.  So I have the same problem
as with growisofs: I'm unable to stream data to cdrecord.

Unfortunately nobody has answered my question: Why am I unable
to stream to growisofs?  Andy?

(My original post with diagnostics is here:)

  http://lists.debian.org/cdwrite/2005/02/msg00047.html

Thank you all.

Mitch.



Reply to: