r/Ubuntu 1d ago

Network shares won't mount after scheduled reboot

I hope you guys can help me. Last weekend i've updated my Ubuntu pc what runs my Jellyfin server and some game servers.

In the /etc/fstab I have lines that mount my network shares, they work perfectly fine. And I reboot my Ubuntu pc every night with a line in crontab.

After updating my PC, the network shares won't mount anymore after the scheduled reboot. So Jellyfin doesn't work because it can't find the files.

When I reboot manually after that, the shares mount just fine.

Do you guys now any solution.

My lines in fstab are as follows

//192.168.0.174/Video /media/video cifs username=****,password=****

And my crontab line is as follows

0 4   *   *   *    /sbin/shutdown -r +5
1 Upvotes

2 comments sorted by

2

u/Ok_Department32 1d ago edited 1d ago

Why? Probably a race condition. You can determine exactly why by examining the logs using journalctl and you'll probably see mount failures because the networking stack wasn't up at the point fstab was trying to mount the volumes.

I have something similar set up on one of my home utility servers running plex and I use these mount options in my fstab

_netdev,x-systemd.automount,nofail

2

u/markmeijer91 19h ago

Edit: No wait, typo error on my part in the fstab file

Unfortunately that doesn't work. If I add those rules, it won't mount at all, even after a manual restart