#Media is on disk, but immich can't find it in the folder structure given by the db
1 messages · Page 1 of 1 (latest)
:wave: Hey @slate hill,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich
.
References
- Container Logs:
docker compose logsdocs - Container Status:
docker ps -adocs - Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
- :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
- :ballot_box_with_check: read applicable release notes.
- :ballot_box_with_check: reviewed the FAQs for known issues.
- :ballot_box_with_check: reviewed Github for known issues.
- :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
- :ballot_box_with_check: uploaded the relevant information (see below).
- :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like
fdisk -landdf -h). - The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close command, and re-open it later if needed.
I'm running on rasbian 12, with 4GB RAM
what was odd to me as well, was the size it showed me on the web interface. the disk has 2TB, the sd (rasbian etc.) 64GB. It started showing me the size of the small disk, even though the large one was mounted at the right location
my dockers are all healthy running, I don't see that ml logs are relevant in this situation
redis logs are only:
21793:C 26 Nov 2024 22:52:52.153 * DB saved on disk
21793:C 26 Nov 2024 22:52:52.153 * RDB: 0 MB of memory used by copy-on-write
1:M 26 Nov 2024 22:52:52.176 * Background saving terminated with success
1:M 26 Nov 2024 22:57:53.050 * 100 changes in 300 seconds. Saving...
1:M 26 Nov 2024 22:57:53.051 * Background saving started by pid 21864
21864:C 26 Nov 2024 22:57:53.135 * DB saved on disk
21864:C 26 Nov 2024 22:57:53.135 * RDB: 0 MB of memory used by copy-on-write
1:M 26 Nov 2024 22:57:53.152 * Background saving terminated with success
repeated the whole time
postgressql logs are a whole lot and i looked into a few of them without finding any unusual stuff
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Ignore the upload subfolder, that’s normal
Please post the output of tree -L 2 from your immich folder
.
├── encoded-video
│ ├── 27b8c805-6333-4e0f-9cc3-89e487da0bc6
│ └── a9c92262-ed7d-494a-8785-eb871ecc09c3
├── library
├── profile
├── thumbs
│ ├── 27b8c805-6333-4e0f-9cc3-89e487da0bc6
│ └── a9c92262-ed7d-494a-8785-eb871ecc09c3
└── upload
├── 27b8c805-6333-4e0f-9cc3-89e487da0bc6
└── a9c92262-ed7d-494a-8785-eb871ecc09c3
12 directories, 0 files
Can you find that thumb file from the error in the thumbs folder?
Also please post docker inspect immich_server
/upload/thumbs is the relative path inside the container
@polar wedge What do you mean with that? It obviously looks there, but the folder doesn't exist and I didn't change anything
@acoustic heart could you take another look at this thread?, it seems to have gone under a little
Did you ever find the matching file on your server? What path is it present at?
the file immich searches for: ./upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
where it is actually located ./thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
relative paths from immich data directory
Err on the side of too much information ;) Post, like, all the paths
Output of tree, etc etc
Full commands, including the paths you're running them in and such
here immich searches: /media/disk1/immich/upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
here it is located: media/disk1/immich/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
immich would not search for /media/disk1, so that does not make sense
you are putting pieces together in your head and skipping steps
i have about 9000 pictures on my immich, wouldn't the output be too big
because you don't understand the underlying immich folder structure
/media/disk1/immich is my data directory
I want to see a log showing one file that immich cannot find, and the corresponding entire path on the host disk, please run ls -l /full/path/to/file/here
that's exactly this
such as ls -l /media/disk1/immich/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp, with a matching log showing that file missing
-rw-r--r-- 1 root root 24770 Nov 3 21:09 /media/disk1/immich/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
there it exists, but running ls -l /media/disk1/immich/upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp gives: ls: cannot access '/media/disk1/immich/upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp': No such file or directory
forget about upload/ -- this is not how the immich folders work
please just post the answers we ask for
the upload/ folder is relative to the WORKDIR, which is /usr/src/app, inside the docker container
it will not exist on the host FS
still waiting for the immich log where it can't find that file
the second paragraph in here
ok let me take a look
it's not the only one, it can't find any thumbnails, but the error is always the same so i saw no benefit of posting them all, but of course I can do that, if you want to
ok how about this: docker exec immich_server ls -l /usr/src/app/upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp
ls: cannot access '/usr/src/app/upload/thumbs/27b8c805-6333-4e0f-9cc3-89e487da0bc6/8c/28/8c28c7b4-20f0-4dce-a5f6-475051d3ad46-thumbnail.webp': No such file or directory
how about docker exec immich_server ls /usr/src/app/upload
backups
encoded-video
library
profile
thumbs
upload
ok and what's in thumbs for example? can you run tree -L 2 inside the immich container? I am not sure if we ship that binary
can i also run that in usr/src/app directly or do i have to do that via docker exec?
this has to be in docker exec
we don't include tree
you might just have to do a bunch of ls commands of each subfolder
saw it rn as well
docker exec immich_server ls -l /usr/src/app/upload/thumbs
drwxr-xr-x 6 root root 4096 Oct 10 17:54 27b8c805-6333-4e0f-9cc3-89e487da0bc6
ok so I guess start going deeper and figure out when we lose the file we are looking for
gotta admit this is pretty strange
I'm also a bit confused, shouldn't there be two folders? since in /media/disk1/immich/thumbs/ there are also 2 folders?
yea, I see that
I think you are not using the mount point you think you are using
perhaps the filesystem was unmounted, docker was started, then the filesystem was mounted on top of it ,so docker still has the underlying handle to the filesystem
you could try unmounting the external drive and look at the mount point
yeah that could be very real indeed
I'm mounting the drive manually after each reboot, since it's external and if it's in fdisk the system won't start at all if the disk is missing
and immich is already starting or finished with that when I'm mounting the disk
That's definitely the issue lol
but likely yours was written to the wrong one when that upgrade was added
Stop Immich, unmount the disk, move anything that's on the unmounted path aside, remount the disk and merge those files back in
And set up automatic mounting :P
ok away from immich, i think i got this
is there a way to mount the disk automatically and still boot normal (and just skip the mounting) if the disk is missing? (raspbian 12)
if you get things fixed now the .immich file mount checks would have caught this
you'll probably have to manually create a .immich file in each of the subfolders (thumbs, library, etc) when you go back to your original drive
in terms of how to handle mounts, you should use /etc/fstab, change the fdisk priority (it shouldn't hang if > 0) and you can also put a sleep 120 in the docker init systemctl init file
merge the internal /usr/app/src paths
or the one on the datadir
and how would I merge them in the internal paths?
Your disk has the files on it and is mounted on /media/disk1. When you unmount the disk, are there still files in that path?
yeah they are
So while the disk is unmounted, move those files somewhere else
Then remount the disk, and move the files back
Thanks a lot guys, it works again!