Re: Issues with cdrsin and USB devices on RHEL5
Mario <[EMAIL PROTECTED]> wrote: > > It seems that libscg still contains the best abstraction from the transient > > Linux kernel interfaces... > > For now my friend, for now ;) All proposals from all people who complaint about the fact that I try to work around the Linux SCSI problems have been much worse then the original software. I don't believe it makes sense to think about this issue until the next incompatible Linux kernel interface change happens ;-) Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, me: > > This DVD-ROM drive is too stupid to recognize multiple > > sessions on DVD-R or DVD+R. (One can scan for ISO 9660 > > headers, though, and successfully mount the sessions > > via option sbsector= .) Bill Davidsen: > Wow, is that actually useful for anything? Amazing! I am running incremental updates of my $HOME. Each session constitutes a complete snapshot of the tree: $ xorriso -dev /dev/sr0 -toc ... Media current: DVD+R Media status : is written , is appendable TOC layout : Idx , sbsector , Size , Volume Id ISO session : 1 , 0 ,739194s , UPDATE_HOME_2008_06_22_191945 ISO session : 2 ,741392 , 20333s , UPDATE_HOME_2008_06_25_190436 ISO session : 3 ,763936 , 19565s , UPDATE_HOME_2008_06_29_001832 ... ISO session : 11 ,950400 , 27435s , UPDATE_HOME_2008_07_15_084804 ISO session : 12 ,980048 , 32535s , UPDATE_HOME_2008_07_16_143936 Media summary: 12 sessions, 990208 data blocks, 1934m data, 2501m free So i get 12 backups, 1.5 GB each, for the price of only 2 GB on media. The media will be full after about 40 of them. If you insert such a media into a DVD burner drive then it will report at least the first and the last session and thus Linux can automatically mount the superblock of the last session. Not so with my DVD-ROM drive. It announces all DVD media as "DVD-ROM", shows only the start of the first session and sometimes a second one at a fantasy address. I.e DVD multi-session is totally broken on MMC level. In that case you have to give mount the superblock address mount -o sbsector=980048 ... To learn about the sessions on a non-multi-session drive, xorriso has an option -rom_toc_scan on which allows to hop along the chain of sessions and find out their superblocks. This implies several MB of reading and eventually ugly noises when entering unwritten area. But afterwards xorriso might tell the sbsectors and be able to extract files from the particular sessions. Another multi-session feature of xorriso is that it can maintain a session list on DVD+RW and other overwriteable media. This is achieved by writing the first session to address 32 and to copy its head to address 0 as if it already was a follow-up session. Due to the smaller waste area between sessions, a DVD+RW can take about 60 of my incremental $HOME backups. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Bill Davidsen <[EMAIL PROTECTED]> wrote: > > Dear gods. Didn't anyone tell them that $[ is deprecated? > > > > pos=$(($pos+1)) > > > > ... is the preferred syntax, and is POSIX/ksh compatible. > > > > > Who cares? The $(( notation is slower to type, easier to get wrong, > gives confusing error messages if you miss the "$" and start with > parens, etc. I know about it, but I would never use it, and it's > visually easier to read correctly. Two "(" are definitely _much_ faster to type than a single "[". Both is non-portable, $[ is not POSIX AFAIK. > If you need max portability and/or readability you use "let pos=pos+1" > anyway. Let is not in the shell. If you like maximum portability, use: pos=`expr $pos + 1` Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
> It seems that libscg still contains the best abstraction from the transient > Linux kernel interfaces... For now my friend, for now ;) KR, M. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Thomas Schmitt wrote: Hi, I'm going to cautiously say that this file, intended for humans but can be parsed, seems to handle anything up to a mix of IDE, "real" SCSI, and USB, Yep. For me it yields plausible results with 4 drives at USB, IDE, and SATA. drive name: sr1 hdc hda sr0 and tells you what the kernel thinks of them. That may be more important than the truth, if a device says it can support feature X, but the kernel doesn't agree, I would not expect that feature to work reliably. If the CDROM driver believes it then it does not necessarily have to be true. Example: Can read multisession: 1 1 1 1 is true with hda only for CD but not for DVD media. This DVD-ROM drive is too stupid to recognize multiple sessions on DVD-R or DVD+R. (One can scan for ISO 9660 headers, though, and successfully mount the sessions via option sbsector= .) Wow, is that actually useful for anything? Amazing! I guess the point is that the drive has support for multisession and advertises same. If this value was zero, I doubt that any option would help. Firmware bugs are not known to the kernel, unfortunately. I would treat this as and AND of capabilities, if this file says the capability is missing it probably really is. If present, the device supports the feature or lies convincingly. ;-) So the feature detection is a direct competitor of libburn's own view of things. To take it into respect would demand to establish conflict handling in case of contradictions. Nevertheless, i will consider to take the "drive name:" line as a hint of how the drive list should look like. In case of deviations, one could issue a warning. Yes, that certainly should be useful in eliminating the non-optical media. Thought it might be useful to tell you what the kernel would let you see and use. A totally overhauled drive detection strategy will have to collect info from such sources and try to verify it by own drive inquiries. So any hint about CD drive info sources is welcome. For now i seem to have put a patch on the problems. After the upcoming release i will reconsider that topic and make some larger changes in the Linux adapter of libburn. -- Bill Davidsen <[EMAIL PROTECTED]> "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Greg Wooledge wrote: On Mon, Jul 14, 2008 at 10:45:25PM +0200, Giulio Orsero wrote: /lib/udev/check-cdrom.sh #!/bin/bash ... pos=$[$pos+1] Dear gods. Didn't anyone tell them that $[ is deprecated? pos=$(($pos+1)) ... is the preferred syntax, and is POSIX/ksh compatible. Who cares? The $(( notation is slower to type, easier to get wrong, gives confusing error messages if you miss the "$" and start with parens, etc. I know about it, but I would never use it, and it's visually easier to read correctly. If you need max portability and/or readability you use "let pos=pos+1" anyway. This is a cd burning list, not the alt.shell.pedantic newsgroup. Let's keep to the main topic. -- Bill Davidsen <[EMAIL PROTECTED]> "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Thomas Schmitt wrote: Hi, i uploaded the current release candidate of cdrskin http://scdbackup.sourceforge.net/cdrskin-0.4.9.tar.gz http://scdbackup.webframe.org/cdrskin-0.4.9.tar.gz It should be able to work on /dev/scd0 if no /dev/sr0 is existing. It should also stay silent about busy /dev/hdX which are identified as "disk" by /proc/ide/hdX/media. And no buffer overflow with drive_scsi_dev_family=scd any more. may I say very nice work, and prompt as well. -- Bill Davidsen <[EMAIL PROTECTED]> "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, Jul 14, 2008 at 10:45:25PM +0200, Giulio Orsero wrote: > /lib/udev/check-cdrom.sh > #!/bin/bash ... > pos=$[$pos+1] Dear gods. Didn't anyone tell them that $[ is deprecated? pos=$(($pos+1)) ... is the preferred syntax, and is POSIX/ksh compatible. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, > > some larger changes in the Linux adapter > > of libburn. > What du you understand by "the linux adaptor"? > Your software is not portable, so why do you have an "adaptor"? Oh. Then i misunderstood my own design. Up to now i believed that libburn's system flavor dependencies were concentrated in libburn/os-*.h libburn/sg-*.c Pun aside. I got neither an own non-Linux system nor an interested user with non-Linux system. So only libburn/os-linux.h libburn/sg-linux.c are operational adapters currently. Inside the Linux adapter i am allowed to rely on Linux peculiarities. Regrettably Linux is not very stable with its peculiarities. So it stays a game of guessing and pondering. I think Bill's proposal to make use of /proc/sys/dev/cdrom/info will become very valuable with the automated pondering. > Are you are talking about the way you probably deal with /dev/ entries > in order to access SCSI? It is about getting a complete list of CD drives without inadvertedly spoiling an ongoing CD-R burn. It is about the fact that in the past /dev/sr* was a reliable list of CD drives under Linux SCSI control. My own system has no /dev/scd* but Giulio's has no /dev/sr*. SuSE versus RedHat. Another undesirable effect with Giulio's is that for some reason /dev/hda is locked by O_EXCL and thus caused failure messages as if it was a busy CD drive. All in all the current way of libburn to test-open /dev/hd[a-z] and /dev/sr[0..31] is not apt any more. I also have to put in doubt libburn's principle to allow only listed drives for SCSI/MMC operations. But this has to wait until after next release. > Then it is nice to see that all people who told me > that cdrecord is doing things wrong _and_ created patches for cdrecord > ended up in cdrecord variants that do no longer work while the original > cdrecord still works ;-) For your amusement: The behavior of vanilla installed SuSE 10.2 with various device scans: $ cdrecord -scanbus Cdrecord-ProDVD-ProBD-Clone 2.01.01a39 ... ... finds nothing since i have no permission for /dev/sg* ... So as superuser: # cdrecord -scanbus ... finds all 4 CD drives and the SATA disk on 5 busses ... $ cdrskin --devices ... finds all 4 CD drives, no hard disk ... $ wodim --devices ... finds only the 2 IDE drives because there is no /dev/scd* ... $ ln -s sr0 /dev/scd0 ; ln -s sr1 /dev/scd1 $ wodim --devices ... finds all 4 CD drives, no hard disk ... The desktop user has rw-access to all CD drives by ACLs (set by udev ?). I hate that and after each boot i run a script which allows rw to group "floppy". > It seems that libscg still contains the best abstraction from the transient > Linux kernel interfaces... The choice to access drives via /dev/sg is not optimal in my eyes: - it is deprecated by the kernel people - /dev/sg* cannot be used as normal file for reading - it is a nexus where disks, tapes, CD drives and whatever meet. I only want CD drives. So i decided to switch to the block devices on kernel 2.6. This switch was not done sufficiently complete, as i had to learn meanwhile. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
"Thomas Schmitt" <[EMAIL PROTECTED]> wrote: > For now i seem to have put a patch on the problems. > After the upcoming release i will reconsider that > topic and make some larger changes in the Linux adapter > of libburn. What du you understand by "the linux adaptor"? Your software is not portable, so why do you have an "adaptor"? Are you are talking about the way you probably deal with /dev/ entries in order to access SCSI? Then it is nice to see that all people who told me that cdrecord is doing things wrong _and_ created patches for cdrecord ended up in cdrecord variants that do no longer work while the original cdrecord still works ;-) It seems that libscg still contains the best abstraction from the transient Linux kernel interfaces... Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, > I tested 0.4.9: > - hda is not touched > - no buffer overflow > - "cdrskin --devices" will show both devices even if no /dev/sr0 is present > - "cdrskin dev=/dev/scd0 ..." burns ok Good to know. But your hda has not been touched by the older version. libburn carefully avoids to open it because it is opened O_EXCL by some other entity. On other systems, a IDE hard disk device can get opened by libburn. But this lasts only until ioctl(HDIO_GET_IDENTITY) fails to show an indication that this is an ATAPI device. Then it gets closed. A hard disk can stand that. A busy CD burner cannot. The only dangerous bug today was the buffer overflow. (Please everybody do not use cdrskin as setuid but rather allow rw-acces to the device file.) As stated already, i will re-assess the way how libburn finds and opens drives. The /proc info shall not be ignored any more. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, Jul 14, 2008 at 10:49 PM, Thomas Schmitt <[EMAIL PROTECTED]> wrote: > Hi, > > i uploaded the current release candidate of cdrskin > http://scdbackup.sourceforge.net/cdrskin-0.4.9.tar.gz > http://scdbackup.webframe.org/cdrskin-0.4.9.tar.gz > > It should be able to work on /dev/scd0 if no /dev/sr0 > is existing. > It should also stay silent about busy /dev/hdX which > are identified as "disk" by /proc/ide/hdX/media. > And no buffer overflow with drive_scsi_dev_family=scd > any more. I tested 0.4.9: - hda is not touched - no buffer overflow - "cdrskin --devices" will show both devices even if no /dev/sr0 is present - "cdrskin dev=/dev/scd0 ..." burns ok Thanks -- [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, > I'm going to cautiously say that this file, intended for humans but can be > parsed, seems to handle anything up to a mix of IDE, "real" SCSI, and USB, Yep. For me it yields plausible results with 4 drives at USB, IDE, and SATA. drive name: sr1 hdc hda sr0 > and tells you what the kernel thinks of them. That may be more important > than the truth, if a device says it can support feature X, but the kernel > doesn't agree, I would not expect that feature to work reliably. If the CDROM driver believes it then it does not necessarily have to be true. Example: Can read multisession: 1 1 1 1 is true with hda only for CD but not for DVD media. This DVD-ROM drive is too stupid to recognize multiple sessions on DVD-R or DVD+R. (One can scan for ISO 9660 headers, though, and successfully mount the sessions via option sbsector= .) So the feature detection is a direct competitor of libburn's own view of things. To take it into respect would demand to establish conflict handling in case of contradictions. Nevertheless, i will consider to take the "drive name:" line as a hint of how the drive list should look like. In case of deviations, one could issue a warning. > Thought it might be useful to tell you what the kernel > would let you see and use. A totally overhauled drive detection strategy will have to collect info from such sources and try to verify it by own drive inquiries. So any hint about CD drive info sources is welcome. For now i seem to have put a patch on the problems. After the upcoming release i will reconsider that topic and make some larger changes in the Linux adapter of libburn. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Thomas Schmitt wrote: Hi, Bill Davidsen: Dumb question, why do you not look at the nice list of CD devices provided ... /proc/sys/dev/cdrom/info I'm going to cautiously say that this file, intended for humans but can be parsed, seems to handle anything up to a mix of IDE, "real" SCSI, and USB, and tells you what the kernel thinks of them. That may be more important than the truth, if a device says it can support feature X, but the kernel doesn't agree, I would not expect that feature to work reliably. Actually i was using the nice list of CD device files which is provided according to the SCSI Howto but has been deprecated by Documentation/devices.txt whereas Documentation/scsi/scsi.txt still refers to the SCSI Howto. /proc is an interesting thing. But where is it documented ? On what feature in /proc can i rely ? /proc/scsi/sg/devices once gave me hints about the activities of my drives. Not any more. :( I will begin to collect /proc addresses about CD drives. Maybe one can develop a kindof expert system from that list. This has been around forever, I see it on an old box running RH8 (2.4.18) as well as a modern dual-core running a recent -rc kernel. Thought it might be useful to tell you what the kernel would let you see and use. -- Bill Davidsen <[EMAIL PROTECTED]> "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, i uploaded the current release candidate of cdrskin http://scdbackup.sourceforge.net/cdrskin-0.4.9.tar.gz http://scdbackup.webframe.org/cdrskin-0.4.9.tar.gz It should be able to work on /dev/scd0 if no /dev/sr0 is existing. It should also stay silent about busy /dev/hdX which are identified as "disk" by /proc/ide/hdX/media. And no buffer overflow with drive_scsi_dev_family=scd any more. Giulio, could you test whether this is true on your system ? Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, Jul 14, 2008 at 9:30 PM, Thomas Schmitt <[EMAIL PROTECTED]> wrote: > > Hi, > > > /proc is an interesting thing. But where is it documented ? > On what feature in /proc can i rely ? > /proc/scsi/sg/devices once gave me hints about the activities > of my drives. Not any more. :( Docs are often outdated about Linux /proc /sys stuff. FYI, on RHEL5 /dev is managed by udev infrastructure; udev will automatically create nodes for all devices under /dev, and in some cases it will make symlinks to make device names more user-friendly. For CD/DVD it will create cdrom, cd-writer, dvd, dvd-writer, symlinks depending on device capabilities; for doing this it uses the following script: /lib/udev/check-cdrom.sh #!/bin/bash pos=0 n=0 sp="$1" what="$2" found=0 [ -e /proc/sys/dev/cdrom/info ] || exit 1 /bin/cat /proc/sys/dev/cdrom/info | { while read line; do if [ "$found" = "0" -a "${line/drive name:}" set ${line/drive name:} while [ $# -gt 0 ]; do pos=$[$pos+1] if [ "$1" == "$sp" ]; then found=1 break fi shift done [ "$found" = "0" ] && exit 1 elif [ "${line/$what:}" != "$line" ]; then set ${line##*$what:} while [ $# -gt 0 ]; do n=$[$n+1] if [ "$n" == "$pos" ]; then if [ "$1" = "1" ]; then exit 0 fi break fi shift done fi done exit 1 } On my system $ /lib/udev/check-cdrom.sh hda DVD;echo $? 1 $ /lib/udev/check-cdrom.sh hda CD-R;echo $? 1 $ /lib/udev/check-cdrom.sh hdc CD-R;echo $? 0 $ /lib/udev/check-cdrom.sh hdc DVD;echo $? 0 $ /lib/udev/check-cdrom.sh hdc DVD-R;echo $? 0 $ /lib/udev/check-cdrom.sh sr0 CD-R;echo $? 0 $ /lib/udev/check-cdrom.sh sr0 DVD;echo $? 0 $ /lib/udev/check-cdrom.sh sr0 DVD-R;echo $? 0 $ /lib/udev/check-cdrom.sh sr1 DVD-R;echo $? 1 -- [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, Bill Davidsen: > Dumb question, why do you not look at the nice list of CD devices provided > ... > /proc/sys/dev/cdrom/info Actually i was using the nice list of CD device files which is provided according to the SCSI Howto but has been deprecated by Documentation/devices.txt whereas Documentation/scsi/scsi.txt still refers to the SCSI Howto. /proc is an interesting thing. But where is it documented ? On what feature in /proc can i rely ? /proc/scsi/sg/devices once gave me hints about the activities of my drives. Not any more. :( I will begin to collect /proc addresses about CD drives. Maybe one can develop a kindof expert system from that list. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Thomas Schmitt wrote: Hi, # cdrskin --devices cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn 0 dev='/dev/hdc' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4163B' ... # ls /dev/sr* ls: /dev/sr*: No such file or directory # ls /dev/sc* /dev/scd0 By default cdrskin will accept /dev/scdN or /dev/sgM but finally insists in seeing a /dev/srN. You may push it towards /dev/scdN by adding option drive_scsi_dev_family=scd The problem will be solved in upcomming version 0.5.0. (It also affects xorriso which can only be helped by creating a /dev/sr0 softlink.) Note that hda is my hard disk, I don't know why cdrskin tries to use it. libburn would know that it is not a CD drive after opening it. But it may not open a CD drive in the progress of burning. Dumb question, why do you not look at the nice list of CD devices provided by the Linux kernel, and assume that anything not on that list is not going to work for CD uses, no matter what it is, or thinks it is. /proc/sys/dev/cdrom/info -- Bill Davidsen <[EMAIL PROTECTED]> "Woe unto the statesman who makes war without a reason that will still be valid when the war is over..." Otto von Bismark -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, 14 Jul 2008 16:49:22 +0200, "Thomas Schmitt" <[EMAIL PROTECTED]> wrote: >libburn/sg-linux.c , line 649: > char fname[10]; >should be at least > char fname[11]; This cleared the error. >Maybe it is best for now if you simply perform >as superuser: > > ln -s scd0 /dev/sr0 With this link it starts the burning process regularly Thanks -- [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, Joerg: > > BTW: why do you like to use cdrskin although cdrecord works for you? Giulio: > The more option I have the better. And that is good so. Giulio: > I understand you [Joerg] 'll rightly say it's a Linux issue cdrecord: > Current: DVD-RAM > ... > Sense Key: 0x3 Medium Error, deferred error, Segment 0 > Sense Code: 0x0C Qual 0x02 (write error - auto reallocation failed) Fru 0x0 cdrskin: > Current: DVD-RAM > ... > cdrskin: burning done I understand the DVD-RAM defect management failed to manage a defect. (I hardly ever see it work properly with my own DVD-RAM experiments.) This looks like a drive+media issue where both programs will probably only differ by random accident and not by technical principle. Linux seems not to be to blame here at all. cdrskin was just the more lucky program in that night. If these failures happen frequently then you have to do something about drive+media compatibility. I.e. try some other media types and/or brands. Try DVD+RW. That's an honest media. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, 14 Jul 2008 16:28:43 +0200, [EMAIL PROTECTED] (Joerg Schilling) wrote: >BTW: why do you like to use cdrskin although cdrecord works for you? The more option I have the better. ie: - BD-RE media: cdrskin can format it (when media is new/maiden), and has an option (not default) to write BD-RE in a "quick" mode (don't recall technical name, I think it's "streaming", it avoids defect management, I always do md5sum checks anyway) even if BD-RE is formatted with spare/defect management area. So writing with cdrskin takes half the time of cdrecord, basically it burns at the nominal speed of BD-RE media. - sometime cdrecord fails and cdrskin will succeed, I can't give you many details, this is a log from last night backup on one of my systems (it's not totally uptodate, so both cdrecord and cdrskin are not the latest versions) I understand you'll rightly say it's a Linux issue, but I'm not a programmer and cannot do anything to force Linux people to make things the right way, I just need the best chance for the backup to complete ok. 13/07/2008 02:31:19 scsidev: '4,0,0' scsibus: 4 target: 0 lun: 0 Linux sg driver version: 3.1.25 SCSI buffer size: 64512 Cdrecord-ProDVD-ProBD-Clone 2.01.01a38 (i686-pc-linux-gnu) Copyright (C) 1995-2008 Jörg Schilling TOC Type: 1 = CD-ROM Using libscg version 'schily-0.9'. Driveropts: 'burnfree' atapi: 1 Device type: Removable CD-ROM Version: 0 Response Format: 2 Capabilities : Vendor_info: 'HL-DT-ST' Identifikation : 'DVDRAM GSA-4163B' Revision : 'A103' Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM. Current: DVD-RAM Profile: DVD-RAM (current) Profile: DVD-R sequential recording Profile: DVD-RW sequential recording Profile: DVD-RW restricted overwrite Profile: DVD+RW Profile: DVD+R Profile: DVD+R/DL Profile: DVD-ROM Profile: CD-R Profile: CD-RW Profile: CD-ROM Profile: Removable Disk (current) Using generic SCSI-3/mmc-2 DVD-R/DVD-RW/DVD-RAM driver (mmc_dvd). Driver flags : NO-CD DVD MMC-3 SWABAUDIO BURNFREE Supported modes: PACKET SAO Drive buf size : 851968 = 832 KB Drive pbuf size: 1966080 = 1920 KB Drive DMA Speed: 2364 kB/s 13x CD 1x DVD 0x BD FIFO size : 4194304 = 4096 KB cdrecord: DMA speed too slow (OK for 1x). Cannot write at speed 2x. Track 01: data 3891 MB padsize:1 MB Total size: 3892 MB = 1992974 sectors Current Secsize: 2048 Total power on hours: -972995840 WARNING: Phys disk size 2314080 differs from rzone size 2236704! Prerecorded disk? WARNING: Phys start: 200704 Phys end 2514783 Blocks total: 2236704 Blocks current: 2236704 Blocks remaining: 243730 Starting to write CD/DVD/BD at speed 2 in real SAO mode for single session. Last chance to quit, starting real write0 seconds. Operation starts. Waiting for reader process to fill input buffer ... input buffer ready. BURN-Free is OFF. Turning BURN-Free on Starting new track at sector: 0 Track 02:0 of 3891 MB written.cdrecord: Input/output error. write_g1: scsi sendcmd: no error CDB: 2A 00 00 00 01 74 00 00 1F 00 status: 0x2 (CHECK CONDITION) Sense Bytes: F1 00 03 00 00 00 00 10 31 88 00 02 0C 02 00 00 Sense Key: 0x3 Medium Error, deferred error, Segment 0 Sense Code: 0x0C Qual 0x02 (write error - auto reallocation failed) Fru 0x0 Sense flags: Blk 0 (valid) cmd finished after 6.773s timeout 100s cdrecord: A write error occured. cdrecord: Please properly read the error message above. write track data: error after 761856 bytes Writing time: 11.870s Average write speed 248.8x. Fixating... Fixating time:0.001s cdrecord: fifo had 76 puts and 13 gets. cdrecord: fifo was 0 times empty and 3 times full, min fill was 92%. -- ATTN: scrittura con cdrecord fallita, tenta con cdrskin cdrskin 0.4.5 : limited cdrecord compatibility wrapper for libburn cdrskin: verbosity level : 1 cdrskin: NOTE : greying out all drives besides given dev='/dev/sg4' cdrskin: scanning for devices ... cdrskin: ... scanning for devices done cdrskin: beginning to burn disc cdrskin: status 1 burn_disc_blank "The drive holds a blank disc" Current: DVD-RAM Track 01: data 3891 MB padsize: 1024 KB Total size: 3892 MB (442:54.98) = 1992974 sectors Lout start: 3892 MB (442:56/98) = 1992974 sectors Starting to write CD/DVD at speed MAX in real SAO mode for single session. Last chance to quit, starting real write in 0 seconds. Operation starts. Waiting for reader process to fill input buffer ... input buffer ready. Starting new track at sector: 0 Track 01:1 of 3892 MB written (fifo 100%) [buf 92%] 2.7x. Track 01:2 of 3892 MB written (fifo 100%) [buf 100%] 2.0x ... Track 01: 3890 of 3892 MB written (fifo 100%) [buf 100%] 2.0x. Track 01: 3891 of 3892 MB written (fifo 100%) [buf 100%] 2.0x. Track 01: 3892 of 3892 MB written (fifo 100%) [buf 100%] 2.1x. cdrskin: thank you for being patient since 1468 seconds Track 01: Total bytes read/written: 4080562176/4081614848 (1992976 sectors). Writing time: 1467.890s
Re: Issues with cdrsin and USB devices on RHEL5
Hi, i see i forgot to paste in the line number libburn/sg-linux.c , line 649: char fname[10]; should be at least char fname[11]; I'm rolling a new development tarball 0.4.9 tonight where all known consequences of the missing-/dev/sr Problem are taken into respect. Maybe it is best for now if you simply perform as superuser: ln -s scd0 /dev/sr0 and do not use drive_scsi_dev_family=scd. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Giulio Orsero <[EMAIL PROTECTED]> wrote: > On Mon, 14 Jul 2008 15:24:32 +0200, "Thomas Schmitt" <[EMAIL PROTECTED]> > wrote: > > >Hi, > > > >By default cdrskin will accept /dev/scdN or /dev/sgM but > >finally insists in seeing a /dev/srN. > > > >You may push it towards /dev/scdN by adding option > > drive_scsi_dev_family=scd > > If I use > # cdrskin drive_scsi_dev_family=scd --devices > I get > > cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn > Note: If this hangs for a while then there is a drive with > unexpected problems (e.g. ill DMA). > One may exclude such a device file by removing r- and w- > permissions for all cdrskin users. > cdrskin: scanning for devices ... > *** buffer overflow detected ***: cdrskin terminated > === Backtrace: = BTW: why do you like to use cdrskin although cdrecord works for you? Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, > > You may push it towards /dev/scdN by adding option > > drive_scsi_dev_family=scd > > If I use > # cdrskin drive_scsi_dev_family=scd --devices > I get > > cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn > *** buffer overflow detected ***: cdrskin terminated Arghh. I believe know where this comes from. libburn/sg-linux.c , line : char fname[10]; should be at least char fname[11] as it gets filled with texts like "/dev/scd12" which is of length 10. It is about time i release the next version. > On Linux you can check if an IDE device is disk or cdrom before doing > anything: > 2.4, 2.6 > # cat /proc/ide/hda/media > disk > # cat /proc/ide/hdc/media > cdrom Thanks for this hint. I will include it in my non-opening device estimations. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Giulio Orsero <[EMAIL PROTECTED]> wrote: > > Trying 1,0,0 as cdrecord recognises it > cdrskin dev=1,0,0 -v -data ciao.iso > fails > cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn > cdrskin: verbosity level : 1 > cdrskin: FATAL : Cannot find /dev/* with Bus,Target,Lun = 1,0,0 > cdrskin: HINT : This drive may be in use by another program currently > > > 4) > # ls /dev/sr* > ls: /dev/sr*: No such file or directory > # ls /dev/sc* > /dev/scd0 > # ls /dev/sg* > /dev/sg0 > # Well this is a general problem if you follow the transient Linux interfaces. cdrecord works because it uses the less volatile and thus more stable kernel interfaces ;-) Jörg -- EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin [EMAIL PROTECTED](uni) [EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
On Mon, 14 Jul 2008 15:24:32 +0200, "Thomas Schmitt" <[EMAIL PROTECTED]> wrote: >Hi, > >By default cdrskin will accept /dev/scdN or /dev/sgM but >finally insists in seeing a /dev/srN. > >You may push it towards /dev/scdN by adding option > drive_scsi_dev_family=scd If I use # cdrskin drive_scsi_dev_family=scd --devices I get cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn Note: If this hangs for a while then there is a drive with unexpected problems (e.g. ill DMA). One may exclude such a device file by removing r- and w- permissions for all cdrskin users. cdrskin: scanning for devices ... *** buffer overflow detected ***: cdrskin terminated === Backtrace: = /lib/libc.so.6(__chk_fail+0x41)[0x8c4f21] /lib/libc.so.6[0x8c4738] /lib/libc.so.6(_IO_default_xsputn+0xcd)[0x84522d] /lib/libc.so.6(_IO_vfprintf+0xd19)[0x81c529] /lib/libc.so.6(__vsprintf_chk+0xad)[0x8c47ed] /lib/libc.so.6(__sprintf_chk+0x30)[0x8c4720] cdrskin[0x806e506] cdrskin[0x805fd1e] cdrskin[0x805cd84] /lib/libpthread.so.0[0x9bb46b] /lib/libc.so.6(clone+0x5e)[0x8b0dbe] === Memory map: 0034a000-0034b000 r-xp 0034a000 00:00 0 [vdso] 007c2000-007dc000 r-xp 03:02 124211 /lib/ld-2.5.so 007dc000-007dd000 r-xp 00019000 03:02 124211 /lib/ld-2.5.so 007dd000-007de000 rwxp 0001a000 03:02 124211 /lib/ld-2.5.so 007e-0091d000 r-xp 03:02 124238 /lib/libc-2.5.so 0091d000-0091f000 r-xp 0013c000 03:02 124238 /lib/libc-2.5.so 0091f000-0092 rwxp 0013e000 03:02 124238 /lib/libc-2.5.so 0092-00923000 rwxp 0092 00:00 0 009b6000-009c9000 r-xp 03:02 124305 /lib/libpthread-2.5.so 009c9000-009ca000 r-xp 00012000 03:02 124305 /lib/libpthread-2.5.so 009ca000-009cb000 rwxp 00013000 03:02 124305 /lib/libpthread-2.5.so 009cb000-009cd000 rwxp 009cb000 00:00 0 00a41000-00a4c000 r-xp 03:02 124263 /lib/libgcc_s-4.1.2-20080102.so.1 00a4c000-00a4d000 rwxp a000 03:02 124263 /lib/libgcc_s-4.1.2-20080102.so.1 08048000-08088000 r-xp 03:02 178440 /usr/bin/cdrskin 08088000-0808c000 rw-p 0003f000 03:02 178440 /usr/bin/cdrskin 0808c000-080dc000 rw-p 0808c000 00:00 0 0986d000-09893000 rw-p 0986d000 00:00 0 b7568000-b7569000 ---p b7568000 00:00 0 b7569000-b7f6b000 rw-p b7569000 00:00 0 b7f6f000-b7f7 rw-p b7f6f000 00:00 0 bfc96000-bfcab000 rw-p bfc96000 00:00 0 [stack] UNIX-SIGNAL: SIGABRT errno= 2 cdrskin: ABORT : Handling started. Please do not press CTRL+C now. cdrskin: ABORT : Trying to ignore any further signals cdrskin: ABORT : Abort processing depends on speed and buffer size cdrskin: ABORT : Usually it is done with 4x speed after about a MINUTE cdrskin: URGE : But wait at least the normal burning time before any kill -9 cdrskin: ABORT : Drive is released and library is shut down now. cdrskin: ABORT : Program done. Even if you do not see a shell prompt. > >> Note that hda is my hard disk, I don't know why cdrskin tries to use it. >Now this /dev/hda is open O_EXCL and so libburn >has no chance to examine it. A busy burner would >look exactly the same. On Linux you can check if an IDE device is disk or cdrom before doing anything: 2.4, 2.6 # cat /proc/ide/hda/media disk # cat /proc/ide/hdc/media cdrom # 2.6 only: # cat /sys/block/hda/device/media disk # cat /sys/block/hdc/device/media cdrom # -- [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Issues with cdrsin and USB devices on RHEL5
Hi, > # cdrskin --devices > cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn > 0 dev='/dev/hdc' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4163B' > ... > # ls /dev/sr* > ls: /dev/sr*: No such file or directory > # ls /dev/sc* > /dev/scd0 By default cdrskin will accept /dev/scdN or /dev/sgM but finally insists in seeing a /dev/srN. You may push it towards /dev/scdN by adding option drive_scsi_dev_family=scd The problem will be solved in upcomming version 0.5.0. (It also affects xorriso which can only be helped by creating a /dev/sr0 softlink.) > Note that hda is my hard disk, I don't know why cdrskin tries to use it. libburn would know that it is not a CD drive after opening it. But it may not open a CD drive in the progress of burning. Such drives get marked by the O_EXCL bit which allows to prevent such a fatal opening. Now this /dev/hda is open O_EXCL and so libburn has no chance to examine it. A busy burner would look exactly the same. I will see what i can do to distinguish both. For now it is planned to issue a message like NOTE: Could not examine busy device '/dev/hda' HINT: Busy '/dev/hda' seems to be a hard disk, as '/dev/hda1' exists. But better check. But i wonder why /dev/hda is permanently open anyway. Usually its /dev/hda1 et. al. which are mounted. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Issues with cdrsin and USB devices on RHEL5
OS: LINUX RHEL5.2 2.6.18-92.1.6.el5 CDRSKIN VERSION: cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn Cdrecord 2.01-Emulation Copyright (C) 2006-2008, see libburnia-project.org libburn interface : 0.4.8 libburn in use: 0.4.8 cdrskin version : 0.4.8 Version timestamp : 2008.05.17.080001 Build timestamp : -none-given- SYSTEM: System with one IDE (cdrecord=1001,0,0) and one USB burner (cdrecord=1,0,0). PROBLEM: cdrskin cannot see the USB burner. Note that hda is my hard disk, I don't know why cdrskin tries to use it. 1) # cdrskin --devices cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn Note: If this hangs for a while then there is a drive with unexpected problems (e.g. ill DMA). One may exclude such a device file by removing r- and w- permissions for all cdrskin users. cdrskin: scanning for devices ... cdrskin: SORRY : Cannot open busy device '/dev/hda' cdrskin: ( Most recent system error: 16 'Device or resource busy' ) cdrskin: ... scanning for devices done cdrskin: Overview of accessible drives (1 found) : - 0 dev='/dev/hdc' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4163B' - 2) # cdrskin -scanbus cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn cdrskin: scanning for devices ... cdrskin: SORRY : Cannot open busy device '/dev/hda' cdrskin: ( Most recent system error: 16 'Device or resource busy' ) cdrskin: ... scanning for devices done Using libburn version '0.4.8'. cdrskin: NOTE : There was 1 drive not shown. cdrskin: HINT : To surely see all drives try option: --devices cdrskin: HINT : or try options: dev=ATA -scanbus # cdrskin dev=ATA -scanbus cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn cdrskin: scanning for devices ... cdrskin: SORRY : Cannot open busy device '/dev/hda' cdrskin: ( Most recent system error: 16 'Device or resource busy' ) cdrskin: ... scanning for devices done scsidev: 'ATA' devname: 'ATA' scsibus: -2 target: -2 lun: -2 Using libburn version '0.4.8'. scsibus1: 1,0,0 0) 'HL-DT-ST' 'DVDRAM GSA-4163B' 'A105' Removable CD-ROM # 3) Using devices as seen by cdrecord: cdrskin dev=1001,0,0 -v -data ciao.iso cdrskin dev=/dev/hdc -v -data ciao.iso cdrskin dev=ATA:1,0,0 -v -data ciao.iso all write to the IDE burner Trying 1,0,0 as cdrecord recognises it cdrskin dev=1,0,0 -v -data ciao.iso fails cdrskin 0.4.8 : limited cdrecord compatibility wrapper for libburn cdrskin: verbosity level : 1 cdrskin: FATAL : Cannot find /dev/* with Bus,Target,Lun = 1,0,0 cdrskin: HINT : This drive may be in use by another program currently 4) # ls /dev/sr* ls: /dev/sr*: No such file or directory # ls /dev/sc* /dev/scd0 # ls /dev/sg* /dev/sg0 # scsi1 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 3 usb-storage: waiting for device to settle before scanning Vendor: HL-DT-ST Model: BD-RE BE06LU10 Rev: YE03 Type: CD-ROM ANSI SCSI revision: 00 sr0: scsi3-mmc drive: 51x/51x writer dvd-ram cd/rw xa/form2 cdda tray sr 1:0:0:0: Attached scsi CD-ROM sr0 sr 1:0:0:0: Attached scsi generic sg0 type 5 usb-storage: device scan complete 5) # cdrecord -scanbus Cdrecord-ProDVD-ProBD-Clone 2.01.01a42 (i686-pc-linux-gnu) Copyright (C) 1995-2008 Jörg Schilling Linux sg driver version: 3.5.27 Using libscg version 'schily-0.9'. scsibus1: 1,0,0 100) 'HL-DT-ST' 'BD-RE BE06LU10 ' 'YE03' Removable CD-ROM 1,1,0 101) * 1,2,0 102) * 1,3,0 103) * 1,4,0 104) * 1,5,0 105) * 1,6,0 106) * 1,7,0 107) * scsibus1001: 1001,0,0 100100) 'HL-DT-ST' 'DVDRAM GSA-4163B' 'A105' Removable CD-ROM 1001,1,0 100101) * 1001,2,0 100102) * 1001,3,0 100103) * 1001,4,0 100104) * 1001,5,0 100105) * 1001,6,0 100106) * 1001,7,0 100107) * # cdrecord writes to both of them -- [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]