jlesage / docker-filebot

Docker container for FileBot
MIT License
173 stars 35 forks source link

[Bug] CIFS share not mounting on first boot only #107

Open bearattack11 opened 5 months ago

bearattack11 commented 5 months ago

Current Behavior

I am using this container on Unraid 6.12.10. I am using Unassigned Devices to mount a SMB share. I have this share mapped to /storage on the FileBot container. When rebooting the Unraid server, FileBot does not mount this SMB share. Rebooting the container fixes this.

There are no errors in the debug log, but I noticed the discrepancy in the log on boot up.

Other jlsage images (e.g., MKVToolNix) work fine.

ON FIRST BOOT: [filebot-info] STORAGE: btrfs [/] @ 16 GB | fuse.shfs [/config] @ 1.9 TB | btrfs [/output] @ 16 GB | btrfs [/watch] @ 16 GB

ON CONTAINER REBOOT: [filebot-info] STORAGE: btrfs [/] @ 16 GB | cifs [/storage] @ 398 GB | fuse.shfs [/config] @ 1.9 TB | btrfs [/watch] @ 16 GB | btrfs [/output] @ 16 GB

Expected Behavior

I expect the SMB share to mount on first boot.

Steps To Reproduce

  1. Reboot Unraid server.
  2. Open Web GUI of FileBot.
  3. Observe that /storage is empty (share not mounted correctly).
  4. Reboot container.
  5. Observe that /storage now shows correct contents.

Environment

Container creation

Used the official image in the Unraid "Apps" section.

Container log

[filebot-info] STORAGE: btrfs [/] @ 16 GB | fuse.shfs [/config] @ 1.9 TB | btrfs [/output] @ 16 GB | btrfs [/watch] @ 16 GB

Container inspect

No response

Anything else?

No response

jlesage commented 5 months ago

Is the container automatically started at boot ? Are you sure that unRAID mounted the SMB share before starting the container? Looks like that at the time the container started, the SMB share was not mounted yet.

bearattack11 commented 5 months ago

Yes, the container is automatically started on boot.

I'm not sure if that the SMB share is mounted before the container, but I have the jlesage/docker-mkvtoolnix container installed and that always flawlessly mounts the SMB shares every time.

I've tried to re-order the container startup sequence so that FileBot starts last (I have about 7 containers total), but that seems to have no impact. Again, MKVToolNix still mounts its SMB share with no issue.

jlesage commented 5 months ago

I don't know why you don't see the same issue with other containers, but the container itself has no control over this SMB mount (i.e. it's not the container that mounts the folder).

You can see the following post that explains how to start a container after a share is mounted: https://forums.unraid.net/topic/142625-wait-first-container-start/

bearattack11 commented 5 months ago

That script definitely did the trick... I'm not sure why this isn't happening with my other containers (all using SMB mounts too) but I guess for now I will thank good luck.

Thank you!