ahembree / ansible-hms-docker

Ansible playbook for automated home media server setup
GNU General Public License v3.0
402 stars 51 forks source link

ERROR: Cannot start service: error while creating mount source path: read-only file system #39

Closed nathanabercrombie closed 4 months ago

nathanabercrombie commented 11 months ago

During the task

TASK [hmsdocker : Ensure containers defined in compose file.]

This error appears for all services. Such as:

ERROR: for bazarr  Cannot start service bazarr: error while creating mount source path '/opt/hms-docker/apps/bazarr/config': mkdir /opt/hms-docker: read-only file system

The permissions on these directories are:

ls -la /opt/hms-docker/
total 28
drwxr-xr-x  3 root root    4096 Oct 21 14:28 .
drwxr-xr-x  4 root root    4096 Oct 21 14:27 ..
drwxr-xr-x 13 root root    4096 Oct 21 14:28 apps
-rw-r--r--  1 root docker 11765 Oct 21 14:28 docker-compose.yml
-rw-r-----  1 root docker   533 Oct 21 14:28 .env

It seems like it can make the directories, like /opt/hms-docker/apps/bazarr/config but something else is having permission issues.

I tried to clear this out with rm -rf /opt/hms-docker and re-running make apply, but I get the same issue. I tried sudo make apply and also tried modifying the secrets_env_group, as you can see above, but none of that helped.

nathanabercrombie commented 11 months ago

By using the advanced config, and changing the hms_docker_data_path to some to a new location, it worked.

Though it was a headache to kill the old traefik process. Can we have a make clean to clear everything?

ahembree commented 11 months ago

For the read-only file system issue, I believe that's an issue with your local system and how the drives/paths are mounted, I don't think this repo caused that issue and cannot be resolved by it.

I'll investigate adding make clean, which steps did you need to do to terminate traefik? Running docker-compose down while in the hms-docker data folder should've been able to spin everything down

LewisLebentz commented 10 months ago

@ahembree I was going to open a new issue, but just saw this one - think I'm having a similar issue.

I just set this up fresh, new OS etc. I set hms_docker_media_share_type to local but am having issues setting up Overseerr, I can't select a root folder. Discovered I needed to set a Root Folder inside Sonarr/Radarr and when I try to do that nothing happens, the logs say:

 -- Path: Folder is not writable by user abc

Is that because I selected local? Can't figure out how to make it writable, would ideally like to keep my setup as clean/standard as possible so trying to avoid messing around with things too much!

I was trying to use /data/media/Movies/.

Edit: I chown'd the folder and now I can add it, is there a way this fix can be persistent and sorted for future users?

ahembree commented 10 months ago

@LewisLebentz It's likely due to selecting local because of the root privs required to create /data/media/Movies, and the containers do not have root privs.

Did you chown the folder to make your current user the owner, or did you make abc the owner (or UID/GID 1234)?

This would be tricky to fix without impacting other users setups if they have their own permissions setup in a custom way. I have an idea in mind and am about to push a new branch, but I'm having some issues getting it working the way I want.

ahembree commented 4 months ago

Closing due to inactivity