Bug 801601 - Cannot eject automount'd disk drives
Cannot eject automount'd disk drives
Product: Fedora
Classification: Fedora
Component: eject (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Luscon
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-03-08 18:18 EST by Ben Boeckel
Modified: 2012-03-13 15:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-03-13 15:03:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ben Boeckel 2012-03-08 18:18:07 EST
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):
Comment 1 Kamil Dudka 2012-03-09 07:14:45 EST
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 15:03:17 EDT
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:

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 15:21:20 EDT
Thanks for providing the details.

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