Bug 438441

Summary: eject: did not find a device /dev/sr0 in /sys/block/
Product: [Fedora] Fedora Reporter: Jesse Keating <jkeating>
Component: ejectAssignee: Zdenek Prikryl <zprikryl>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: dcantrell
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-21 09:24:26 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 235706    

Description Jesse Keating 2008-03-20 17:30:09 EDT
Recently in post-beta rawhide I lost the ability to eject media.  The above
message is always seen.  Nautilus is unable to eject it as well.

$ ls /sys/block/sr0/
capability  dev  device  holders  make-it-fail  power  queue  range  removable 
size  slaves  stat  subsystem  uevent

$ file /dev/sr0
/dev/sr0: block special (11/0)

Linux lumos 2.6.25-0.130.rc6.git3.fc9 #1 SMP Wed Mar 19 17:11:59 EDT 2008 x86_64
x86_64 x86_64 GNU/Linux

eject-2.1.5-9.fc9.x86_64
Comment 1 Jesse Keating 2008-03-21 09:24:26 EDT
Found the problem.  sysfs changed things in /sys/block/ to be symlinks, which
conflicted with a patch in eject to ensure that the device is removable.  The
check would only look in directories in /sys/block/ for content, and thus would
ignore symlinks.  I've updated the patch and issued the build.

It's worth noting that this fixes ejecting things via Nautilus in GNOME too.
Comment 2 Zdenek Prikryl 2008-03-26 08:48:31 EDT
These changes in /sys/block are only in rawhide or even in F{7,8}?
Comment 3 Jesse Keating 2008-03-26 08:54:47 EDT
I was only aware of the problem on rawhide.  Have we attempted to get this patch
accepted upstream?
Comment 4 Zdenek Prikryl 2008-03-26 09:18:18 EDT
No, we haven't. This patch is really painful. At my computers everything works
fine, but I have some other reports that in some cases eject doesn't work
(devices like iPod etc). Probably I will have to write additional check for
hotpluggable flag, so this patch isn't fully correct.
Comment 5 Zdenek Prikryl 2008-03-26 09:30:38 EDT
See here: https://admin.fedoraproject.org/updates/F8/FEDORA-2008-2623.
Unfortunately, I don't know very much about theirs problems, so it's difficult
to fix something. Maybe they have problem because of symlinks too.
Comment 6 Jesse Keating 2008-03-26 09:53:57 EDT
(In reply to comment #5)
> See here: https://admin.fedoraproject.org/updates/F8/FEDORA-2008-2623.
> Unfortunately, I don't know very much about theirs problems, so it's difficult
> to fix something. Maybe they have problem because of symlinks too.

Actually that looks like for some reason his eject is looking for an "scd0"
device, when his device is actually "sr0".  I'd have to see more of his system
to know.