Bug 801601

Summary: Cannot eject automount'd disk drives
Product: [Fedora] Fedora Reporter: Ben Boeckel <fedora>
Component: ejectAssignee: Michal Luscon <mluscon>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: kdudka, mluscon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-13 19:03:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ben Boeckel 2012-03-08 23:18:07 UTC
Description of problem:
If autofs is used to mount optical drives, eject tries to umount the file that specifies the automount rules. I don't know if this is a regression (no pre-F15 machines to test on).

Version-Release number of selected component (if applicable):
eject-2.1.5-21.fc15.x86_64

Comment 1 Kamil Dudka 2012-03-09 12:14:45 UTC
This works fine on my box, tested with eject-2.1.5-21.fc15.x86_64 installed on rawhide:

eject: using default device `cdrom'
eject: device name is `cdrom'
eject: expanded name is `/dev/cdrom'
eject: `/dev/cdrom' is a link to `/dev/sr0'
eject: `/dev/sr0' is mounted at `/misc/cd'
eject: checking if device "/dev/sr0" has a removable or hotpluggable flag
eject: unmounting device `/dev/sr0' from `/misc/cd'
eject: `/dev/sr0' is not a multipartition device
eject: trying to eject `/dev/sr0' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sr0' using SCSI commands
eject: SCSI eject succeeded

Do you have any non-default configuration?

Comment 2 Ben Boeckel 2012-03-13 19:03:17 UTC
Yeah, it's fairly non-default.

--- BEGIN auto.master (snippet)
/mnt/cdrom    /etc/auto.cdrom    timeout=15
--- END auto.master

--- BEGIN auto.cdrom
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
cdrw  -fstype=iso9660,ro,nosuid,nodev :/dev/cdrw
dvd   -fstype=iso9660,ro,nosuid,nodev :/dev/dvd
dvdrw -fstype=iso9660,ro,nosuid,nodev :/dev/dvdrw
--- END auto.cdrom

--- BEGIN findmnt output (snippet)
├─/mnt/cdrom                    /etc/auto.cdrom    autofs      rw,relatime,fd=36,pgrp=997,timeout=300,minproto=5,maxproto=5,indirect
│ └─/mnt/cdrom/dvd              /dev/sr0           iso9660     ro,nosuid,nodev,relatime
--- END findmnt output

--- BEGIN mount output (snippet)
/dev/sr0 on /mnt/cdrom/dvd type iso9660 (ro,nosuid,nodev,relatime)
--- END mount output

--- BEGIN eject output (as user)
umount: /mnt/cdrom/dvd is not in the fstab (and you are not root)
eject: unmount of `/mnt/cdrom/dvd' failed
--- END eject output

And now when I test it as root, it works…. ISTR the output being something like this though:

--- BEGIN
umount: /etc/auto.cdrom is not in the fstab
eject: unmount of `/etc/auto.cdrom' failed
--- END

It did fail, even as root, but I can't reproduce with the same version and disc. If I see it again, I'll reopen the bug.

Comment 3 Kamil Dudka 2012-03-13 19:21:20 UTC
Thanks for providing the details.