COMMAND SEQUENCE ERROR when reading from pipe or stdin
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".
(Ultimately I want the data to be streamed from a
backup program, not from a file)
I'm running RedHat FC3 on a P4, with FC3's version of
dvd+rw-tools 5.21.4.10.8. The kernel is stock FC3
2.6.9-1.667, with no relevant kernel cmd-line args.
There are no automount daemons running (I killed hald
and dbus-daemon-1 and removed the "managed" line from
/etc/fstab) and as far as I can tell, nothing else is
accessing the drive. ps aux looks clean to me, and
lsof shows nothing that has /dev/hdc open.
I have straced it in both cases and I don't see any
relevant difference between the two runs. (strace
doesn't show what the ioctl return buffer data is).
Please see below for more information; I hope it's
sufficient.
Any ideas why I'm not able to pipe data into growisofs?
Many thanks,
Mitch.
# Prepare the source file.
[root@homer /mnt/hdb2]# dd if=/dev/zero of=/tmp/zero-10M bs=10M count=1
1+0 records in
1+0 records out
[root@homer /mnt/hdb2]# ls -l /tmp/zero-10M
-rw-r--r-- 1 root root 10485760 Feb 18 11:48 /tmp/zero-10M
# Blank the media
[root@homer /mnt/hdb2]# dvd+rw-format -blank /dev/hdc
* DVD±RW/-RAM format utility by <appro@fy.chalmers.se>, version 4.10.
* 4.7GB DVD-RW media in Sequential mode detected.
* blanking |
# Write file directly
[root@homer /mnt/hdb2]# growisofs -Z /dev/hdc=/tmp/zero-10M
Executing 'builtin_dd if=/tmp/zero-10M of=/dev/hdc obs=32k seek=0'
/dev/hdc: FEATURE 21h is not on, engaging DAO...
/dev/hdc: reserving 5120 block, warning for short DAO recording
/dev/hdc: "Current Write Speed" is 2.0x1385KBps.
1605632/10485760 (15.3%) @0.0x, remaining 0:27
1605632/10485760 (15.3%) @0.0x, remaining 0:49
1605632/10485760 (15.3%) @0.0x, remaining 1:06
1605632/10485760 (15.3%) @0.0x, remaining 1:28
1605632/10485760 (15.3%) @0.0x, remaining 1:45
1605632/10485760 (15.3%) @0.0x, remaining 2:01
1605632/10485760 (15.3%) @0.0x, remaining 2:23
1605632/10485760 (15.3%) @0.0x, remaining 2:40
1605632/10485760 (15.3%) @0.0x, remaining 2:56
1605632/10485760 (15.3%) @0.0x, remaining 3:19
1605632/10485760 (15.3%) @0.0x, remaining 3:35
builtin_dd: 5120*2KB out @ average 0.2x1385KBps
/dev/hdc: flushing cache
# Blank the media
[root@homer /mnt/hdb2]# dvd+rw-format -blank /dev/hdc
* DVD±RW/-RAM format utility by <appro@fy.chalmers.se>, version 4.10.
* 4.7GB DVD-RW media in Sequential mode detected.
* blanking |
# Write file via stdin
[root@homer /mnt/hdb2]# cat /tmp/zero-10M | growisofs -Z /dev/hdc=/dev/fd/0
Executing 'builtin_dd if=/dev/fd/0 of=/dev/hdc obs=32k seek=0'
/dev/hdc: FEATURE 21h is not on, engaging DAO...
/dev/hdc: "Current Write Speed" is 2.0x1385KBps.
:-! "COMMAND SEQUENCE ERROR"@LBA=0h. Is media being read?
:-! the LUN appears to be stuck at 0h, retrying in 5 secs...
0/4706074624 ( 0.0%) @0x, remaining ??:??
:-! "COMMAND SEQUENCE ERROR"@LBA=0h. Is media being read?
:-! the LUN appears to be stuck at 0h, retrying in 5 secs...
^C
# Blanking again
[root@homer /mnt/hdb2]# dvd+rw-format -blank /dev/hdc
* DVD±RW/-RAM format utility by <appro@fy.chalmers.se>, version 4.10.
* 4.7GB DVD-RW media in Sequential mode detected.
* blanking -
# Media info
[root@homer /mnt/hdb2]# dvd+rw-mediainfo /dev/hdc
INQUIRY: [TEAC ][DV-W50E ][1.30]
GET [CURRENT] CONFIGURATION:
Mounted Media: 14h, DVD-RW Sequential
Media ID: PRINCO
Current Write Speed: 2.0x1385=2770KB/s
Write Speed #0: 2.0x1385=2770KB/s
Write Speed #1: 1.0x1385=1385KB/s
Speed Descriptor#0: 00/2298495 R@1.0x1385=1385KB/s W@2.0x1385=2770KB/s
Speed Descriptor#1: 00/2298495 R@1.0x1385=1385KB/s W@1.0x1385=1385KB/s
READ DVD STRUCTURE[#0h]:
Media Book Type: 32h, DVD-RW book [revision 2]
Legacy lead-out at: 5120*2KB=10485760
READ DISC INFORMATION:
Disc status: blank
Number of Sessions: 1
State of Last Session: empty
Number of Tracks: 1
READ TRACK INFORMATION[#1]:
Track State: invisible incremental
Track Start Address: 0*2KB
Next Writable Address: 0*2KB
Free Blocks: 2297888*2KB
Track Size: 2297888*2KB
READ CAPACITY: 1*2048=2048
[root@homer /mnt/hdb2]#
Reply to: