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]
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]
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
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
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: 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, 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
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, 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: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
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
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
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, 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
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
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 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]