Jellyfin Forum
troubleshooting missing libraries - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: troubleshooting missing libraries (/t-troubleshooting-missing-libraries)



troubleshooting missing libraries - the-bort-the - 2024-07-06

Currently, after an unexpected power outage or reboot to host, my libraries aren't coming back. Turns out the mounted usb drives are being lost and I need to manually remount them. Is it preferred to just edit the /etc/fstab file with all the mounts? 

It's also noticed that after re-mounting them and doing a scan of all libraries, it takes some time for them to show up in the UI.

It's also not uncommon for me to also restart the docker container because they aren't showing up after a scan. I usually wait 15-20 minutes before noticing I need to restart the container.

Version: 10.8.13 
Operating System: Linux 
Architecture: X64


RE: troubleshooting missing libraries - Efficient_Good_5784 - 2024-07-06

Could you share your server logs using pastebin?


RE: troubleshooting missing libraries - the-bort-the - 2024-07-06

Is this sufficient? It's a really big file and exceeded the pastebin file size, so I chopped it.

https://pastebin.com/A6xHN7Zm


RE: troubleshooting missing libraries - Efficient_Good_5784 - 2024-07-06

Jellyfin most likely is booting up before the drives come online causing Jellyfin to mark that they're no longer present. Make sure the drives are mounted before starting Jellyfin.

Jellyfin needs to rescan a library every time it moves in the system.

Looks like the database got corrupted somehow.

I'm going to guess the frequent shutdowns of the server caused that. You should let it do its thing instead and check the logs if you're questioning if it got hung up on something before restarting the container.

As for the power outage failure, I suggest getting a UPS. It will save your data next time so that your server doesn't get shutdown during something important.


RE: troubleshooting missing libraries - TheDreadPirate - 2024-07-06

You can try my solution for a similar (the same?) problem in this thread.

https://forum.jellyfin.org/t-jellyfin-deletes-all-media-metadata-when-unable-to-access-media-filles?pid=22855#pid22855

Essentially you are telling the jellyfin service to not start until a particular mount is online.


RE: troubleshooting missing libraries - the-bort-the - 2024-07-07

I currently do not see a jellyfin.service file under the path you provided. Also there is no jellyfin.service file on the container file system. Should I create one to add the line you mentioned from the other thread?

Code:
$user@host: ls /etc/systemd/system/multi-user.target.wants/
anacron.service        containerd.service      cups.path              e2scrub_reap.service    NetworkManager.service  samba-ad-dc.service    ufw.service
avahi-daemon.service    cron.service            cups.service            ModemManager.service    nmbd.service            smbd.service            wpa_supplicant.service
console-setup.service  cups-browsed.service    docker.service          networking.service      remote-fs.target        ssh.service



RE: troubleshooting missing libraries - TheDreadPirate - 2024-07-08

I missed the part in the first post where you are running Jellyfin in docker. You can try doing the same thing in the docker.service file. I'm not sure if there is an equivalent way of forcing a container to wait for a mount directly in a docker compose or something.


RE: troubleshooting missing libraries - the-bort-the - 2024-07-12

Thus far I have been able to update the /etc/fstab and while it appears the host can reboot and see the drives mounted, it still took a manual rescan of all libraries. Next I will move onto your suggestion for adding the changes to the docker.service file.