Server not getting to UPLOAD_LOCATION
Hi, I'm using an ubuntu VM in proxmox, with portainer.
I've added a new drive to my ubuntu VM, mounted it and made a directory for photos: /database/immich_photos
In deployment of the stack, I changed all
- .env
to - stack.env
My environment variables:
My deployed server shows only 3.9GiB of space, and uploaded photos are not landing in /database/immich_photos
Perhaps it is a permissions issue? Usually in portainer I make my volumes using portainer, and they come out as root owned directories, not sure if I need something different for this use case.
Thanks for any help! I'm super excited to try this out 😄
41 Replies
My volumes created by the stack appear as shown above if that is useful.
The UPLOAD_LOCATION should not be the volume that is created by docker
it should be an existing folder on your machine that you have access to
I've added a new drive to my ubuntu VM, mounted it and made a directory for photos: /database/immich_photosHave you made sure that this folder is mounted? Can you check with
lsblk
?Here you can see the
ls-l
from within /database, and then lsblk
and here I've made a test file to be sure it's really mounted and working.

Hmm, it is mounted as root
probably why
I should be mounted as your user
ajm

okay, I've chowned them, I'll give it a try!
deleted everything and rebuilding from scratch to see if that fixed it
okay!
Interesting, after deleting the stack and all associated volumes in portainer, I remade the stack and deployed it, and I get this:

After recreating the admin account of course. It's odd because it shows the used space I had previously (the small photo dump I tested with to see if it was landing in the right spot
try
/database
for the upload_locationThis is from in the container, I haven't uploaded since I wiped and redeployed. Somehow the 1.5gb I uploaded before has persisted.

from /database can you do df -h?
and I can see the volume mounted as it should be, so I'm not sure what is up

yeah, I see the 2TB from that in my vm shell, from in the container shell you can see the 3.9G
maybe restart the VM?

I think it must be some black magic with portainer and bind mounts... I suspect there is some 'portainer-path'/database/immich_photos that portainer generated
I am not sure, I haven't heard anything about this scenario yet. @Zack when you have a chance can you help explain this scenario?
Did you create this volume in Portainer?
It was created by the docker-compose stack setup
After restarting the vm, the upload directory is empty again, but it is still only 3.9GB
lsblk still show the mount after restarting?
yeah, still mounted as expected from the vm

instead of mount to /database/immich_photos
just try
/database
in the UPLOAD_LOCATIONokay, I'll try that. If I stop the container and go to edit it, I can see it is correctly set as a Bind, and the paths look correct

same result using /database, still 3.9G inside the container
the host still shown as
/database/immich_photos
thoughI just didn't do a new screenshot, that was the previous one:

ok how about this
you create a new directory at
/mnt/immich_data
then mount your drive to that location
then use /mnt/immich_data
for your upload_location
remember to chown it and make sure it has the correct user and group permissionaha, found some info here: https://github.com/portainer/portainer/issues/4332
GitHub
Bug? Error bind-mounting with Portainer, but not with the actual cl...
Question: NOTE: Using WSL2 and Swarm. When I use this in Portainer's stack editor, and then click the deploy/update button, I get an error: version: "3.7" services: pihole: hostname: ...
"When creating the docker compose through Portainer it fails with a compose file that works fine outside of Portainer.
I discovered that outside of Portainer my paths, when not relative, must include /mnt/DRIVE-LETTER/path/to/location but within Portainer they must NOT have /mnt & must start with the drive letter.
an example path that works Outside Portainer but does not work inside Portainer
/mnt/k/docker/tv/xteve/conf:/home/xteve/conf
An example of a path that works Inside Portainer but not outside
/k/docker/tv/xteve/conf:/home/xteve/conf"
nice so you need that
/mnt
Seems I HAVE to use a directory starting with /mnt, and portainer doesn't want to be told /mnt
rebooting everything with fingers crossed!
yahheeh
hmmm, now I have the drive mounted at /mnt/database, with the immich_photos folder present, and I am giving it /database/immich_photos as the path as described in that page, same result
going to try giving it /mnt/database/immich_photos now
yeah you should be doing this instead
aha! success!
So I guess that guys issue with /mnt being ignored has been fixed, but it seems portainer needs specific directories for binds to work properly, and one of those is /mnt
So in the end, I'm using /mnt/database/immich_photos as my UPLOAD_LOCATION, and I have my drive mounted on /mnt/database
Yeah I think that should work, you can use
/mnt/database
but I assume you want that sub level to split things upyeah, I'm planning to keep backups in photos
/mnt/database/photos that is
well enjoy, let us know if you run into any other issues
Will do! Thanks again for helping me troubleshoot portainer, haha!