Growisofs IO errors
- From: Chris Carlen <crcarleRemoveThis@xxxxxxxxxxxxxxx>
- Date: Wed, 29 Mar 2006 14:37:52 -0800
Hi:
I am trying to burn Verbatim Datalife 4x DVD+RW media using a Panasonic SW-9573 drive on Suse 9.1 Linux 2.6.5. Using dvd+rw-tools-5.17.4.8.6-17.5.5 and mkisofs-2.01a27-21.
I created an image this way:
mkisofs -o cd-rw/test.dvdrw.backup.iso -R -J -v misc pdf junk
Which completed without difficulty.
I then try to burn with:
growisofs -dvd-compat -speed=4 -Z /dev/dvdrw=cd-rw/test.dvdrw.backup.iso
>ls -l /dev/dvdrw
lrwxrwxrwx 1 root root 3 2005-01-25 16:37 /dev/dvdrw -> hde
I'm not sure if using it as an IDE device is a problem or not. I thought in kernel 2.6 we needn't worry about SCSI emulation stuff anymore.
What happens is that when the command is issued from the command line in konsole, it almost always works. Only sometimes it does something like this if I didn't eject and reload the media before trying to burn it:
About to execute 'builtin_dd if=cd-rw/test.dvdrw.backup.iso of=/dev/dvdrw obs=32k seek=0'
/dev/dvdrw: restarting DVD+RW format...
/dev/dvdrw: "Current Write Speed" is 4.1x1385KBps.
:-[ WRITE@LBA=0h failed with SK=3h/ASC=73h/ACQ=03h]: Input/output error
:-( write failed: Input/output error
However, when I do the same commands from a script, I get very frequent problems. My script is below. Basically, I always eject and reload the tray before growisofs. Yet, about 20% of the time I get IO errors and a failed growisofs.
I'm wondering if simply the fact that on the CLI, the drive is usually done with it's checking out the disk before I attempt to burn. Whereas when in the script, growisofs is called immediately after the tray loads.
There are no automount functions running on this machine. Submount is though alive for USB removables. DVDs and CDs do not automount. Nor is the media mounted when I attempt to growisofs.
There are other errors as well. Sometimes it appears as if the write can't get started on the first blob:
About to execute 'builtin_dd if=cd-rw/test.dvdrw.backup.iso of=/dev/dvdrw obs=32k seek=0'
Sleeping for 5 sec...4 sec...3 sec...2 sec...1 sec...0 sec...
/dev/dvdrw: "Current Write Speed" is 4.1x1385KBps.
1605632/62781440 ( 2.6%) @0.3x, remaining 4:26
1605632/62781440 ( 2.6%) @0.0x, remaining 6:21
1605632/62781440 ( 2.6%) @0.0x, remaining 8:53
1605632/62781440 ( 2.6%) @0.0x, remaining 10:47
1605632/62781440 ( 2.6%) @0.0x, remaining 12:42
1605632/62781440 ( 2.6%) @0.0x, remaining 15:14
:-[ WRITE@LBA=310h failed with SK=3h/ASC=73h/ACQ=03h]: Input/output error
:-( write failed: Input/output error
/dev/dvdrw: flushing cache
/dev/dvdrw: writing lead-out
:-[ CLOSE SESSION failed with SK=3h/ASC=73h/ACQ=03h]: Input/output error
Note, I never have problems with this media when using K3b, so I don't believe it's the media.
Clues welcome. Thanks!
P.S. Script:
#!/bin/bash
# This is a backup script for creating backup
# archives on DVD+RW media and verifying them.
# It logs its progress in a log file. It also shuts down the PC if desired.
# Usage:
# dvdrw.backup TYPE [--shutdnpc]
# where TYPE is the first field of the name of the source list file.
# Ex:
# "test" to use the test.dvdr.backup.list source list file
#
# If the "--shutdnpc" option is given then the command:
# "sudo shutdown -h now" will be given at the end of the script.
# We want to reside in the user's home
cd
NAME=dvdrw.backup # name of this script
BDIR=backup # the path under $HOME where this script lives
LDIR=$BDIR/logs # the path under $HOME where logs go
IDIR=cd-rw # the path under $HOME where ISO images go
DVDRW_DEV=/dev/dvdrw # path to media writer device
DVDRW_MNT=/media/dvdrw # mount point for media
DVDRW_SCSI_DEV=ATA:3,0,0
if [ "x$1" = x ]; then # there is nothing in $1
echo "Error: no arguments; don't know what to do!"
exit 1
# If we get here there is something in $1, so don't need to quote it
elif [ $1 = --shutdnpc ]; then
echo "Error: you can't make --shutdnpc the first argument!"
exit 1
# If we get here we have at least some first argument other than
# --shutdnpc
elif [ -s $BDIR/$1.$NAME.list ]; then
LIST=$BDIR/$1.$NAME.list
else
echo "Error: source list file doesn't exist or is empty!"
exit 1
fi
SHUTDOWN=false
if [ "x$2" != x ]; then # there is something in $2 so deal with it
if [ $2 != --shutdnpc ]; then
echo "Error: second argument must be --shutdnpc or nothing!"
exit 1
else # it must be --shutdnpc
SHUTDOWN=true
fi
fi
LOGFILE=$LDIR/$1.$NAME.log
if [ -e $LOGFILE ]; then
echo "Moving old log file..."
mv $LOGFILE $LOGFILE.old
fi
date |tee -a $LOGFILE
echo "We are in the $BDIR/$NAME script" |tee -a $LOGFILE
echo "Using source list file: $LIST" |tee -a $LOGFILE
echo "Creating ISO9660 image: $IDIR/$1.$NAME.iso" |tee -a $LOGFILE
mkisofs -o $IDIR/$1.$NAME.iso -R -J -v -graft-points -path-list $LIST 2>&1\
|tee -a $LOGFILE
if [ ${PIPESTATUS[0]} = 0 ]; then
echo "ISO image created successfully." |tee -a $LOGFILE
else
echo "There were errors creating ISO image, check source list file!" \
|tee -a $LOGFILE
exit 1
fi
# Good idea to reload tray before & after writing to reset drive
# before and after write.
echo "Unmounting $DVDRW_DEV..." |tee -a $LOGFILE
umount $DVDRW_DEV 2>&1 |tee -a $LOGFILE
echo "Re-loading media tray..." |tee -a $LOGFILE
eject $DVDRW_DEV
eject -t $DVDRW_DEV
# Must use -dvd-compat to write lead-out properly so IO errors don't occur.
growisofs -speed=4 -dvd-compat -Z $DVDRW_DEV=$IDIR/$1.$NAME.iso 2>&1\
|tee -a $LOGFILE
# There was a case where IO errors occured on the burn but growisofs returned
# an OK exit status because it suceeded at reloading the platter before
# exiting. See logs. What to do about this?
if [ ${PIPESTATUS[0]} = 0 ]; then
echo "DVD+RW filesystem created successfully." |tee -a $LOGFILE
else
echo "There were errors burning the DVD+RW!" \
|tee -a $LOGFILE
exit 1
fi
# The growisofs command ejects and reloads the tray by itself, so we
# needn't do it here. Or sometimes it doesn't. Ugh!
echo "Mounting and comparing source ISO image to media..." |tee -a $LOGFILE
mount $DVDRW_MNT 2>&1 |tee -a $LOGFILE
if [ ${PIPESTATUS[0]} != 0 ]; then
echo "ERROR: Could not mount media! Exiting..." |tee -a $LOGFILE
exit 1
fi
# This part isn't ready for prime time:
#for d in `ls -aA $DVDRW_MNT`; do
# diff -r $d $DVDRW_MNT/$d 2>&1 |tee -a $LOGFILE
#done
date |tee -a $LOGFILE
if [ $SHUTDOWN = true ]; then
echo "Shutting Down Linux..." |tee -a $LOGFILE
sudo /sbin/shutdown -h now
fi
--
Good day!
________________________________________
Christopher R. Carlen
Principal Laser&Electronics Technologist
Sandia National Laboratories CA USA
crcarleRemoveThis@xxxxxxxxxxxxxxx
NOTE, delete texts: "RemoveThis" and
"BOGUS" from email address to reply.
.
- Prev by Date: Re: Bad blocks in raid5 disk
- Next by Date: Re: How to make a BASH script echo the commands?
- Previous by thread: Bad blocks in raid5 disk
- Next by thread: can't load Windows after Grub installation
- Index(es):
Relevant Pages
|