Bug 129671 - k3b does not find SCSI drives on first startup
k3b does not find SCSI drives on first startup
Status: CLOSED DUPLICATE of bug 134822
Product: Fedora
Classification: Fedora
Component: k3b (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
:
Depends On:
Blocks: FC3Target
  Show dependency treegraph
 
Reported: 2004-08-11 14:49 EDT by Ralf Ertzinger
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:05:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace -f -e trace=open,ioctl (231.72 KB, text/plain)
2004-09-24 08:31 EDT, Ralf Ertzinger
no flags Details
Output of the commands requested above (55.04 KB, text/plain)
2004-10-06 12:36 EDT, Ralf Ertzinger
no flags Details

  None (edit)
Description Ralf Ertzinger 2004-08-11 14:49:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040809

Description of problem:
When starting k3b for the first time after system startup, drives
connected to the SCSI bus are not found. IDE drives show up fine.

Quitting k3b and restarting makes the SCSI drives reappear, as does
selecting the "Refresh" button in the devices tab of the configuration.
Using the last method does not make the drives appear in the directory
tree in the upper left corner of the k3b window, though.

Version-Release number of selected component (if applicable):
k3b-0.11.12-2

How reproducible:
Always

Steps to Reproduce:
1. Start k3b for the first time after system startup
2. Look if all drives are detected
3.
    

Actual Results:  SCSI drives are missing from the directory tree and
the configuration->devices tab, IDE drives show up.

Expected Results:  All drives show

Additional info:
Comment 1 Harald Hoyer 2004-08-20 08:11:25 EDT
which kernel version?
Comment 2 Ralf Ertzinger 2004-08-21 17:47:06 EDT
Last tested version was kernel-2.6.7-1.515. I am downloading the
latest updates now.
Comment 3 Ralf Ertzinger 2004-08-23 11:23:05 EDT
Can't test currently due to device node problems related to udev.
Comment 4 Harald Hoyer 2004-08-24 11:16:01 EDT
update to the newest udev
Comment 5 Ralf Ertzinger 2004-08-24 19:37:35 EDT
Doing so and building a new initrd brought back the SCSI device nodes.

The behaviour is still there with 2.6.8-1.526, but I noticed something
helpful.

k3b does not detect the SCSI drives if the sr_mod kernel module is not
loaded when starting k3b (the module is loaded on demand, and is often
not needed before). k3b causes the module to be loaded, but seemingly
not early enough to actually detect the drives. When quitting k3b, the
module is loaded, and so the next start detects the SCSI drives.
Manually unloading sr_mod confirms this behaviour (no SCSI drives on
next k3b startup).
Comment 6 Harald Hoyer 2004-09-03 06:19:40 EDT
ok, new k3b, new cdrtools and new dvd+rw-tools should be worth a retry :)
Comment 7 Ralf Ertzinger 2004-09-03 06:54:39 EDT
With a system current as of today (kernel, udev, k3b...), k3b does not
see any drives at all on startup. This is mainly due to udev
weirdness, the /dev/cdrom*, /dev/cdwriter* et al links are missing,
and because of this the permissions on the devices are not set
correctly by /etc/security/console.perms. In addition, the SCSI CDROM
driver is not being loaded, so the SCSI device nodes are missing, too.

When loading sr_mod manually, and setting the permissions on all CDROM
device nodes to enable read/write access by every user, k3b detects
the DVD writer connected to /dev/hdc. This device is detected
correctly as a writer, the writing modes displayed in the config
dialog are correct, as are the "writes ..." and "reads ..." entries.

The SCSI drives, however, remain invisible. sr_mod is loaded, /dev/sr*
has the correct permissions. Manually adding the devices in the
configuration dialog fails, too. k3b claims that there is no
additional device to be found.
Comment 8 Harald Hoyer 2004-09-22 04:46:30 EDT
should be fixed now with new k3b, cdrecord and udev
Comment 9 Ralf Ertzinger 2004-09-22 08:19:04 EDT
The IDE writer is seen by k3b, and seems to be fully functional (I
have only looked at the config screen, but all the necessary frobs are
set as they ought to be).

All SCSI drives remain invisible to the system at large, due to
missing /dev entries. Please see Bug 131762 and Bug 133171 for similar
reports.
Comment 10 Harald Hoyer 2004-09-22 08:37:03 EDT
/dev/sr? are now mapped to /dev/scd? with the new udev package
Comment 11 Ralf Ertzinger 2004-09-22 08:44:12 EDT
Which udev would that be? I have udev-030-27, and neither sr? nor scd?
appear in /dev.

kernel is 2.6.8-1.584, initrd was rebuilt to include latest udev.

Oh, manually loading sr_mod makes /dev/scdX and associated /dev/cdromX
appear, but sr_mod is not loaded automatically, because the device
nodes are missing. Kind of a chicken-egg-problem.
Comment 12 Harald Hoyer 2004-09-22 08:48:19 EDT
newesr udev is udev-032 in rawhide
Comment 13 Harald Hoyer 2004-09-22 08:50:16 EDT
if I load my scsi host adapter module, sr_mod is loaded automatically...
kernel-2.6.8-1.541smp
Comment 14 Ralf Ertzinger 2004-09-22 08:56:21 EDT
OK, the newest udev had not made it's way to my mirror-of-choice, I am
getting it from another mirror now.

The scsi host adapter module is loaded by initrd in my case (I don't
know why, since there are no hard disks attached to it anyway, but
mkinitrd seems happy that way, and no harm is done), but it does not
load sr_mod.
Comment 15 Ralf Ertzinger 2004-09-22 09:10:24 EDT
Please see Bug 133194.
Comment 16 Harald Hoyer 2004-09-22 09:50:29 EDT
On my system, if the scsi adapter module is loaded it automatically
loads the sr_mod module after detecting the CDROM attached to it...
Comment 17 Harald Hoyer 2004-09-23 12:20:05 EDT
# rpm -qf /etc/hotplug/scsi.agent
hotplug-2004_04_01-5

this hotplug agent loads sr_mod for me.

you may set in /etc/sysconfig/hotplug:
DEBUG=1
and watch /var/log/messages
Comment 18 Harald Hoyer 2004-09-23 12:20:41 EDT
which scsi hostadapter do you have?
Comment 19 Ralf Ertzinger 2004-09-23 19:20:05 EDT
Up to the latest and greatest udev/kernel/k3b, and still no luck on
the automatic SCSI drive loading.

The hostadapter is a "Adaptec AHA-2940U/UW/D / AIC-7881U" (courtesty
of lspci), driver is aic7xxx, loaded by initrd (thus, sr_mod can not
be loaded by hotplug when the hostadapter comes up, because sr_mod.ko
is not part of the initrd image).

I tried inserting the sr_mod driver manually, before logging into X,
which creates /dev/scdX and several /dev/cdromX entries. So far, so good.

Logging into X chown()s all cdrom entries (1 IDE, 3 SCSI) to my user
id. Fine. But k3b still does not see any of the SCSI drives. Something
must still be missing.

So we have two different problems here, I think.
Comment 20 Harald Hoyer 2004-09-24 04:03:52 EDT
could you please attach the output of:
$ strace -f -o open,ioctl k3b

Comment 21 Ralf Ertzinger 2004-09-24 08:30:51 EDT
I assume you meant
$ strace -f -e trace=open,ioctl k3b
Comment 22 Ralf Ertzinger 2004-09-24 08:31:30 EDT
Created attachment 104261 [details]
strace -f -e trace=open,ioctl
Comment 23 Harald Hoyer 2004-09-24 08:41:50 EDT
what does:
$ cat /proc/sys/dev/cdrom/info

say?
Comment 24 Harald Hoyer 2004-09-24 08:45:31 EDT
Hmm... k3b checks...

4848  open("/dev/scd0", O_RDWR|O_NONBLOCK) = 11
4848  ioctl(11, CDROMAUDIOBUFSIZ, 0xfeee85b8) = 0
4848  ioctl(11, 0x5386, 0xfeee8724)     = 0
4848  open("/dev/scd1", O_RDWR|O_NONBLOCK) = 11
4848  ioctl(11, CDROMAUDIOBUFSIZ, 0xfeee85b8) = 0
4848  ioctl(11, 0x5386, 0xfeee8724)     = 0
4848  open("/dev/scd2", O_RDWR|O_NONBLOCK) = 11
4848  ioctl(11, CDROMAUDIOBUFSIZ, 0xfeee85b8) = 0
4848  ioctl(11, 0x5386, 0xfeee8724)     = 0
Comment 25 Ralf Ertzinger 2004-09-24 12:34:06 EDT
[sun@nausicaa ~ :) 1]$ cat /proc/sys/dev/cdrom/info
CD-ROM information, Id: cdrom.c 3.20 2003/12/17

drive name:             sr2     sr1     sr0     hdc
drive speed:            1       6       0       40
drive # of slots:       1       1       1       1
Can close tray:         1       1       1       1
Can open tray:          1       1       1       1
Can lock tray:          1       1       1       1
Can change speed:       0       1       1       1
Can select disk:        0       0       0       0
Can read multisession:  1       1       1       1
Can read MCN:           1       1       1       1
Reports media changed:  1       1       1       1
Can play audio:         1       1       1       1
Can write CD-R:         0       1       0       1
Can write CD-RW:        0       1       0       1
Can read DVD:           0       0       1       1
Can write DVD-R:        0       0       0       1
Can write DVD-RAM:      0       0       0       0
Can read MRW:           1       1       1       1
Can write MRW:          1       1       1       1
Can write RAM:          1       1       1       1
Comment 26 Ralf Ertzinger 2004-10-05 14:04:06 EDT
For some obscure reason k3b now manages to see one of the SCSI drives
as well (scd0, the DVD drive). I am not sure what triggered that, but
it may be a newer kernel (currently -590)
Comment 27 Ralf Ertzinger 2004-10-05 17:25:52 EDT
OK, I've found the obscure reason: there was a CD in the drive.
Whenever a medium is in one of the SCSI drives when k3b starts (does
not have to be mounted, just be there), k3b detects the drive.

This seems to leave some "residue" somehow. Example:

1) Insert CD in SCSI drive
2) start k3b -> scsi drive is detected (correct name, device,
properties), IDE drive is detected (as always)
3) quit k3b
4) remove disk from SCSI drive
5) start k3b -> IDE drive is now displayed twice, once with it's own
device node and properties, once as the (now empty) SCSI drive (with
the device node and properties of the SCSI drive, but with the name of
the IDE drive)

Very strange things happen.
Comment 28 Harald Hoyer 2004-10-06 11:23:38 EDT
This could be related to bug 134822 
could you try:
# for i in /dev/scd*;do dvd+rw-mediainfo $i;done
and
# for i in /dev/sg*;do  cdrecord -VVVVVVVV -inq dev=$i;done
# for i in /dev/scd*;do  cdrecord -VVVVVVVV -inq dev=$i;done
Comment 29 Ralf Ertzinger 2004-10-06 12:36:46 EDT
Created attachment 104846 [details]
Output of the commands requested above

This is a "script" dump, there may be funny characters in it. The commands are
executed without disks in the drives first, and with disks in them in the
second run.
Comment 30 Ralf Ertzinger 2004-10-06 12:41:39 EDT
When I start k3b after doing this (without disks in the drives), I get
three drives listed in the config dialog. All are called "_NEC DVD_RW
ND-2500A" (which is the drive at hdc), but the properties and devices
are those of scd0 (the pioneer dvd reader) and scd2 (the traxdata cd
writer). scd1 does not show, but I suspect I know why that is.
Comment 31 Ralf Ertzinger 2004-10-06 12:46:15 EDT
Sorry for the confusion, but scd2 is not the traxdata writer, but the
plextor cd drive.
Comment 32 Harald Hoyer 2004-10-06 12:47:47 EDT
ok, it seems that the inquiry does not succeed without disks in the
drives... does k3b find all with disks in the drive?
Comment 33 Ralf Ertzinger 2004-10-06 12:55:12 EDT
Yes, all drives are correctly found and identified as what they are.
Kernel is 2.6.8-1.590
Comment 34 Harald Hoyer 2004-10-06 12:57:27 EDT
so, I think, I can make this bug a DUPLICATE of bug 134822 ??
Comment 35 Ralf Ertzinger 2004-10-06 13:00:30 EDT

*** This bug has been marked as a duplicate of 134822 ***
Comment 36 Red Hat Bugzilla 2006-02-21 14:05:05 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.