Phalcode / gamevault-app

Frontend for the self-hosted gaming platform for drm-free games
https://gamevau.lt
Other
281 stars 12 forks source link

Reading game library from NFS share #345

Closed casudo closed 7 months ago

casudo commented 7 months ago

Your Question

I am currently facing issues with the servers game library when I store them inside a NFS share.

Additional Context

Is this possible? I've set the permissions to read write, but the container cannot create files in the directory.

VM1 ../games -> NFS share to -> VM2 (mounted as ../games_nfs) -> Running Gamevault Backend Server as Container -> bind mount like this: /mnt/nfs_folders/games_nfs:/gamefiles

Alfagun74 commented 7 months ago

Should not be an issue. Your permissions are set to read write but for whom? GameVault runs on userid 1000 and groupid 1000 by default. You can change it via env vars.

casudo commented 7 months ago

Should not be an issue. Your permissions are set to read write but for whom? GameVault runs on userid 1000 and groupid 1000 by default. You can change it via env vars.

image Inside of the container it looks like this. On the host in the VM the user and group is set to the default group of my normal user (not root).

casudo commented 7 months ago

I've changed PUID & PGID to 0 and now it shows me this: image

Alfagun74 commented 7 months ago
  1. try chmodding to 777 to check if this is really the issue
  2. whats the exact error you are facing, can you show me any logs?
casudo commented 7 months ago
  1. try chmodding to 777 to check if this is really the issue

    1. whats the exact error you are facing, can you show me any logs?

chmodding to 777 helped me to create files in the directory, heres the output: image

Container logs: image

Alfagun74 commented 7 months ago

looks good to me, any further issues?

casudo commented 7 months ago

looks good to me, any further issues?

Well, it still don't show the games in the client.

Alfagun74 commented 7 months ago

Try restarting the server to reindex, or just press the reindex button in the admin panel on the client. And check your logs if the games got indexed

casudo commented 7 months ago

Try restarting the server to reindex, or just press the reindex button in the admin panel on the client. And check your logs if the games got indexed

image

Those are the logs right after I restarted GameVault Server and started the GameVault Client (below the highlighted lines). There are still no games found.

casudo commented 7 months ago

image

and the log lines after manually clicking "Reindex games". The client respond that the reindex was successful.

Alfagun74 commented 7 months ago

Try 777 on one of the Files aswell it definitely seems like a permissions issue

casudo commented 7 months ago

Try 777 on one of the Files aswell it definitely seems like a permissions issue

Did that now. I've changed the permission to 777 for one of the .zip files in VM1 which shares the ../games folder. In the GameVault Server container running on VM2, I can see that the changes are correct (rwxrwxrwx). I restarted GameVault Server aswell as manually reindexed the games - no luck. The log lines were exactly the same.

casudo commented 7 months ago

I did an ls on VM2 which has the shared ../games folder from VM1 mounted, and the folder name ../games_nfs has a green background with blue text. According to this answer, this means the following:

"Blue text with green background indicates that a directory is writable by others apart from the owning user and group, and does not have the sticky bit set (o+w, -t)."

Alfagun74 commented 7 months ago

Show me your docker compose file please

casudo commented 7 months ago

Show me your docker compose file please

version: "3"

networks:
  database:
    external: true

services:
  gamevault:
    container_name: gamevault
    image: phalcode/gamevault-backend:latest
    restart: unless-stopped
    ports:
      - 8088:8080
    volumes:
      - /mnt/raid1/docker/gamevault/images:/images
      - /mnt/raid1/nfs_shares/games_nfs:/gamefiles
    environment:
      - TZ=Europe/Berlin
      - DB_HOST=postgresql # PostgreSQL Container Name
      - DB_USERNAME=myuser # PostgreSQL Username
      - DB_PASSWORD=mypassword # PostgreSQL Password
      - DB_NAME=gamevault # Gamevault's PostgreSQL Database Name
      - SERVER_ADMIN_USERNAME=gavakea # Gamevault Admin Username
    hostname: gamevault
    networks:
      - database
Alfagun74 commented 7 months ago

Well... There's your culprit after all 😂

The mountpoint is /files not /gamefiles. GameVault doesn't know /gamefiles.

casudo commented 7 months ago

Well... There's your culprit after all 😂

The mountpoint is /files not /gamefiles. GameVault doesn't know /gamefiles.

Well, it's fixed now. Have you changed the mountpoint lately? /gamefiles was in my own documentation as well, but maybe I already documented this wrong. My bad for the trouble, thanks for helping me out! :)

Alfagun74 commented 7 months ago

It's been /files since the first lines of coding this :)