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

[Bug]: Unable to install games into /mnt/games mounted Docker volume #57

Closed
tnielsen2 opened this issue Jul 10, 2023 · 5 comments
Closed
Labels
status:awaiting-triage type:bug Something isn't working

Comments

@tnielsen2
Copy link
Contributor

Describe the Bug

Problem: The container cannot write to the /mnt/games Docker volume mount, although permissions appear correct.

Upon fresh install of the container using docker-compose, everything works except the /mnt/games folder is not visible in the Steam client.

After following the troubleshooting steps here, I was then able to see the games folder named: "Mounted Games", but unable to read/write to the folder, being met with the following error:

An error occurred while installing <game>: "disk write error"

Steps to Reproduce

  1. sudo docker stop <container>
  2. sudo docker rm <container>
  3. sudo docker rmi <image>
  4. cd /opt/container-data/steam-headless/home
  5. sudo rm -rf ~/.local/share/flatpak
  6. cd /opt/container-services/steam-headless
  7. sudo docker-compose up -d --force-recreate

Expected Behavior

Being able to install games to the volume mount.

Screenshots

image
image
image
image

Relevant Settings

  • default docker compose file as per here.
  • ext4 file system for /mnt/games
  • Host /mnt/ permissions (user trent is 1000:1000):
trent@dell-e:/mnt$ ll
total 12
drwxr-xr-x  3 root  root  4096 Jul  9 19:19 ./
drwxr-xr-x 22 root  root  4096 Jul 10 14:18 ../
drwxrwxrwx  4 trent trent 4096 Jul 10 13:12 games/
  • Host games folder (and recursive) permissions:
trent@dell-e:/mnt/games$ ll
total 16
drwxrwxrwx 4 trent trent 4096 Jul 10 13:12 ./
drwxr-xr-x 3 root  root  4096 Jul  9 19:19 ../
drwxrwxrwx 3 trent trent 4096 Jul  9 19:59 GameLibrary/

docker-compose relevant mount config:

    # VOLUMES:
    volumes:
      # The location of your home directory.
      - /opt/container-data/steam-headless/home/:/home/default/:rw
      # The location where all games should be installed.
      # This path needs to be set as a library path in Steam after logging in.
      # Otherwise, Steam will store games in the home directory above.
      - /mnt/games/:/mnt/games/:rw
      # Input devices used for mouse and joypad support inside the container.
      - /dev/input/:/dev/input/:ro
      # The Xorg socket. This will be shared with other containers so they can access the X server.
      - /opt/container-data/steam-headless/.X11-unix/:/tmp/.X11-unix/:rw
      # Pulse audio socket. This will be shared with other containers so they can access the audio sink.
      - /opt/container-data/steam-headless/pulse/:/tmp/pulse/:rw
      # Store dind var files in a volume
      - steam-headless-var-lib-docker:/var/lib/docker/:rw
      # Store flatpak var files in a volume
      - steam-headless-var-lib-flatpak:/var/lib/flatpak/:rw

Version

Build: [2023-07-10 08:33:45] [master] [3be80a9] [debian]

Platform

  • Ubuntu - 22.04.1 LTS (Jammy Jellyfish)
  • 5.15.0-76-generic x86_64 x86_64 GNU/Linux
  • | NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
  • Docker version 24.0.4, build 3713ee1
  • docker-compose version 1.29.2, build unknown

Relevant log output

No logs found in docker logs, and I was unable to see/find any logs in the steam app when attempting a game install.
@tnielsen2 tnielsen2 added status:awaiting-triage type:bug Something isn't working labels Jul 10, 2023
@tnielsen2
Copy link
Contributor Author

As a troubleshooting step, I have tried completely removing all folders within the /mnt/games folder, to see what happened.
The container recreated the GameLibrary/SteamLibrary folders and also recreated the libraryfolder.vdf file, but the problem still exists.

@tnielsen2 tnielsen2 changed the title [Bug]: [Bug]: Unable to install into /mnt/games mounted Docker volume Jul 10, 2023
@tnielsen2 tnielsen2 changed the title [Bug]: Unable to install into /mnt/games mounted Docker volume [Bug]: Unable to install games into /mnt/games mounted Docker volume Jul 10, 2023
@tnielsen2
Copy link
Contributor Author

tnielsen2 commented Jul 10, 2023

After further digging, I was able to find the installer log here within the container:
/home/default/.var/app/com.valvesoftware.Steam/.steam/steam/logs/content_log.txt

It showed the following log entry indicating it couldn't write to a missing folder:


[2023-07-10 15:51:21] Client version: 1687386907
[2023-07-10 15:51:21] Loaded Steam library folders configuration: /home/default/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/libraryfolders.vdf
[2023-07-10 15:51:22] Loaded 3 apps from install folder "/home/default/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps\appmanifest_*.acf".
[2023-07-10 15:51:22] Loaded 0 apps from install folder "/mnt/games/GameLibrary/SteamLibrary/steamapps\appmanifest_*.acf".
[2023-07-10 15:51:22] Triggered async write of Steam library folders configuration (2 libraries).
[2023-07-10 15:54:17] Library folder "/mnt/games/GameLibrary/SteamLibrary/steamapps" is not writable (Disk write failure).
[2023-07-10 15:54:17] Failed installing AppID 424840 (Disk write failure)
[2023-07-10 17:54:27] Library folder "/mnt/games/GameLibrary/SteamLibrary/steamapps" is not writable (Disk write failure).
[2023-07-10 17:54:27] Failed installing AppID 424840 (Disk write failure)

By creating the /mnt/games/GameLibrary/SteamLibrary/steamapps folder, I was then able to install to the /mnt/games folder.

sudo mkdir /mnt/games/GameLibrary/SteamLibrary/steamapps
sudo chmod -R 777 /mnt/games
sudo chown -R trent:trent /mnt/games

This is now a writable/usable folder. Can anything be done as part of the installer script to create this directory? If not, I can submit a PR to the instructions for docker-compose and close this issue.

@Josh5
Copy link
Collaborator

Josh5 commented Jul 10, 2023

If we add that, we need to add it in a way that first checks if steam has been configured. It should only run to create the missing directories if that libraryconfig file is missing (so on the firat run). Otherwise the container will create this directory for everyone all the time even if they dont want it.

@tnielsen2
Copy link
Contributor Author

PR submitted to address this. LMK if you have any better idea/way to accomplish this.

@Josh5
Copy link
Collaborator

Josh5 commented Jul 12, 2023

PR submitted to address this. LMK if you have any better idea/way to accomplish this.

Legend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:awaiting-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants