Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udev issues causes hangs and docker crashing #97

Closed
jcfrosty opened this issue Apr 13, 2022 · 2 comments
Closed

udev issues causes hangs and docker crashing #97

jcfrosty opened this issue Apr 13, 2022 · 2 comments
Labels
enhancement sponsor ❤️ Thanks for the support!

Comments

@jcfrosty
Copy link
Contributor

jcfrosty commented Apr 13, 2022

Have you read and understood this part of the readme?

[X] YES

[] NO

Issue description: unraid and other Linux Distro UDEV ISSUES
This is not intended to be a bug that requires work by rix1337 or changes in the docker. This is an issue with Docker hosts that appears to be prevalent across multiple distros (Manjaro, Arch, Fedora, Unraid, and possibly more). This is merely to document the issue and the solution for those possibly experiencing problems and possibly believe the issue could be the docker.

There is a udev rule for persistent storage that can cause hanging upon entering specific video disc into drives.

If you wish to fix/correct this problem without altering the core udev files you may follow these instructions:

Copy the current persistent-storage.rules to the directory for custom rules.

sudo cp /usr/lib/udev/rules.d/60-persistent-storage.rules /etc/udev/rules.d/60-persistent-storage.rules
sudo vim /etc/udev/rules.d/60-persistent-storage.rules

In the file you should be looking for this line:

# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
  IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
  IMPORT{builtin}="blkid --noraid"

Those IMPORT lines cause issues so we need to replace them with a line that tells udev to end additional rules for SR* devices:

# probe filesystem metadata of optical drives which have a media inserted
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \
  GOTO="persistent_storage_end"
##  IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
  GOTO="persistent_storage_end"
##  IMPORT{builtin}="blkid --noraid"

You can comment these lines out or delete them all together, then replace them with the GOTO lines. You may then either reboot OR reload the rules. If you're using Unraid, you'll need to edit the the original udev rule and reload.

root@linuxbox# udevadm control --reload-rules && udevadm trigger
@rix1337 rix1337 added the sponsor ❤️ Thanks for the support! label Apr 13, 2022
@jcfrosty
Copy link
Contributor Author

I'm linking #98 to this issue.

@rix1337
Copy link
Owner

rix1337 commented Apr 14, 2022

Thank you for documenting this. #98 is merged. Closing this now.

@rix1337 rix1337 closed this as completed Apr 14, 2022
@rix1337 rix1337 pinned this issue Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement sponsor ❤️ Thanks for the support!
Projects
None yet
Development

No branches or pull requests

2 participants