Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#42071 - [systemd] Hitting eject on DVD drive does not unmount media; gives read errors /w new DVD

Attached to Project: Arch Linux
Opened by David Edwards (lynx) - Monday, 22 September 2014, 20:31 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 22 March 2015, 15:13 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas B├Ąchler (brain0)
Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Hitting eject on DVD drive does not result in media being unmounted. Putting in new DVD results in DVD read errors.

Whilst I have seen it argued that a user should always unmount and eject using software and not via DVD drive optical button, to me it seems like a perfectly ordinary usage scenario to want to eject using the drive button, particularly in the case of ROM media.

Steps to reproduce:

- enter DVD
- eject DVD using drive eject button
- put in different DVD
- $mount |grep sr0
- $dmesg

DVD playback of new disk will not work and errors issue in dmesg such as:

[ 2348.391264] end_request: I/O error, dev sr0, sector 12134268
[ 2348.391267] Buffer I/O error on device sr0, logical block 3033567

This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 22 March 2015, 15:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  upstream commits included in systemd-219 should resolve this. Please raise with upstream if this is still not WAI.
Comment by David Edwards (lynx) - Monday, 22 September 2014, 20:33 GMT Comment by Jan de Groot (JGC) - Monday, 22 September 2014, 21:23 GMT
Before switching to udisks, in hal ages, when you press the hardware eject button, hal would receive notification, unmount the volume and eject by using software. I don't know how udisks does this these days.

How do you manage to get the disk out while it's still mounted, has something been changed in the kernel these days?
Comment by David Edwards (lynx) - Tuesday, 23 September 2014, 20:00 GMT
The hal system sounds like what should happen. I just hit eject on the drive. Nothing special.
Comment by Jan de Groot (JGC) - Thursday, 25 September 2014, 14:54 GMT
I checked the /lib/udev/rules.d directory for rules concerning cdrom devices. When you insert media in /dev/sr* devices, udev locks the drive using the cdrom_id tool, mounted or not, it's locked. When you press the button, udev generates an eject event, which is passed to the cdrom_id tool with --eject. This tool doesn't check for any mounts, it just throws out the disk. You can reproduce this by running /usr/lib/udev/cdrom_id --eject /dev/sr0 as root, the drive will open and media is still mounted.
Comment by David Edwards (lynx) - Thursday, 25 September 2014, 19:25 GMT
Thanks for the insights. Is this an Archlinux problem I wonder? I filed the following bug report against the kernel: https://bugzilla.kernel.org/show_bug.cgi?id=85111
Comment by Jan de Groot (JGC) - Thursday, 25 September 2014, 20:29 GMT
I would say udev bug. Previously mount would lock the drive and umount would unlock it. Now udev locks the drive and unlocks it whatever state it is as soon as you hit the eject button.
Comment by Dave Reisner (falconindy) - Friday, 16 January 2015, 17:24 GMT
Thanks to a recent thread on systemd-devel, I've realized that this is due to a setting in systemd-udevd.service. Does this behave as expected if you remove MountFlags=slave from systemd-udevd.service, systemctl daemon-reload, and systemctl restart systemd-udevd?

Loading...