I
Immich5mo ago
Joloxx9

NVME drive for cache - am I doing it right:

please have a look on my two files: docker compose: https://pastebin.com/RnBkGMcZ env: https://pastebin.com/cpmSdf81 what I have done is I have added instructions from this topic : https://github.com/immich-app/immich/discussions/2328 Am I correct assusming that following can/should be on NVME: THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/ UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/ PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/ VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/ And this one one HDD: LIBRARY_LOCATION=/mnt/user/Immich/ Can you please confirm, thanks!
47 Replies
Immich
Immich5mo ago
:wave: Hey @Joloxx9, 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 :immich:. References - Container Logs: docker compose logs docs - Container Status: docker ps -a docs - 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... 1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time). 2. :ballot_box_with_check: read applicable release notes. 3. :ballot_box_with_check: reviewed the FAQs for known issues. 4. :ballot_box_with_check: reviewed Github for known issues. 5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy). 6. :ballot_box_with_check: uploaded the relevant information (see below). 7. :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 -l and df -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. Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Mraedis
Mraedis5mo ago
hi @Joloxx9 that seems to be good to go One small adjustment though You have LIBRARY_LOCATION=/mnt/user/Immich/ and UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/ confused Try this for clarity, docker compose:
- ${DATA_LOCATION}:/usr/src/app/upload
- ${UPLOAD_LOCATION}:/usr/src/app/upload/upload
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
- ${DATA_LOCATION}:/usr/src/app/upload
- ${UPLOAD_LOCATION}:/usr/src/app/upload/upload
- ${LIBRARY_LOCATION}:/usr/src/app/upload/library
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
Env file:
LIBRARY_LOCATION=/mnt/user/Immich/
DATA_LOCATION=/mnt/apps/Immich-Cache/
THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/
UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/
PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/
VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/
LIBRARY_LOCATION=/mnt/user/Immich/
DATA_LOCATION=/mnt/apps/Immich-Cache/
THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/
UPLOAD_LOCATION=/mnt/apps/Immich-Cache/upload/
PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/
VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/
The names can get a bit confusing. Alternatively you can also put UPLOAD_LOCATION in the HDD like so docker compose:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- ${THUMBS_LOCATION}:/usr/src/app/upload/thumbs
- ${PROFILE_LOCATION}:/usr/src/app/upload/profile
- ${VIDEO_LOCATION}:/usr/src/app/upload/encoded-video
- /etc/localtime:/etc/localtime:ro
Env file:
UPLOAD_LOCATION=/mnt/user/Immich/
THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/
PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/
VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/
UPLOAD_LOCATION=/mnt/user/Immich/
THUMBS_LOCATION=/mnt/apps/Immich-Cache/thumbs/
PROFILE_LOCATION=/mnt/apps/Immich-Cache/profile/
VIDEO_LOCATION=/mnt/apps/Immich-Cache/encoded-video/
Because you really only want videos, thumbs and profile elsewhere
Joloxx9
Joloxx9OP5mo ago
You know what I made it easier as I do not want to fight with it now, however got issue,I think something is not mounted etc right, so I am using two things in ENV FILE: UPLOAD_LOCATION /qnap/data/foty and DB_DATA_LOCATION /data/immich however I am having those issues now in log from immich server at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) [Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (8)... Error: getaddrinfo EAI_AGAIN database at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) [Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (9)... Error: getaddrinfo EAI_AGAIN database at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) [Nest] 17 - 12/23/2024, 1:53:28 PM ERROR [ExceptionHandler] getaddrinfo EAI_AGAIN database Error: getaddrinfo EAI_AGAIN database at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:120:26) microservices worker exited with code 1 Killing api process Initializing Immich v1.123.0 Detected CPU Cores: 12 Starting api worker Starting microservices worker (node:7) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead. (Use node --trace-deprecation ... to show where the warning was created) (node:7) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead. (Use node --trace-deprecation ... to show where the warning was created) (node:17) [DEP0060] DeprecationWarning: The util._extend API is deprecated. Please use Object.assign() instead. (Use node --trace-deprecation ... to show where the warning was created) Which database is he talking about?
Mraedis
Mraedis5mo ago
The database, immich_postgres container If it works after the errors then that means the container is just simply starting up
Joloxx9
Joloxx9OP5mo ago
no it is not working it is jsut restarting, I am using stock docker compose and ENV, immich is running on the server and data is mounted on this server from NAS I do not know if I mounted it correctly... funny thing when I had everything on nas it was ok
Mraedis
Mraedis5mo ago
DB_DATA is on the NAS?
Joloxx9
Joloxx9OP5mo ago
yes
Joloxx9
Joloxx9OP5mo ago
No description
Mraedis
Mraedis5mo ago
You shouldn't network mount the database, that'll work very poorly as we can see here
Joloxx9
Joloxx9OP5mo ago
hmm I might move back, but firstly I just want this to work I only do not understound why it got no access to it
Mraedis
Mraedis5mo ago
If you want to move your immich install, best do a backup-restore
Zeus
Zeus5mo ago
We aren’t going to help you use a network mount for the database
Mraedis
Mraedis5mo ago
In your case, just run it on the NAS, do the backup, restore the DB on your new server and mount the NAS for the images
Joloxx9
Joloxx9OP5mo ago
is database that slow ven when server - nas connection is 2.5Gb?
Mraedis
Mraedis5mo ago
It doesn't matter Network postgres WILL fail
Joloxx9
Joloxx9OP5mo ago
hmm I can keep imich on the nas
Mraedis
Mraedis5mo ago
and the database is only a couple of GB even with very large photo libraries
Joloxx9
Joloxx9OP5mo ago
at least I have removed plex etc so - can I keep database on server(NVME) and upload location on NAS(HDD), would that work?
Mraedis
Mraedis5mo ago
Yes, that's how many people do it 🙂
Joloxx9
Joloxx9OP5mo ago
okay that make sence, didn't know about it, let me modify it and we will see if I got an errors
Mraedis
Mraedis5mo ago
bulk storage = UPLOAD_LOCATION/library and UPLOAD_LOCATION/upload Fast storage = UPLOAD_LOCATION/encoded-videos UPLOAD_LOCATION/thumbs DB_DATA_LOCATION profile is whatever, it's literally only your profile pictures
Zeus
Zeus5mo ago
Also it’s better to not mount /library and /upload separately if you can help it, better to mount /usr/src/app/upload on the NAS and then do the thumbs etc as sub folders
Mraedis
Mraedis5mo ago
This corresponds to https://discord.com/channels/979116623879368755/1320722118689689620/1320748675856728074 this setup approximately (It's just missing DB_DATA_LOCATION)
Joloxx9
Joloxx9OP5mo ago
I think I am stupid, please have a look at that:
Joloxx9
Joloxx9OP5mo ago
No description
Joloxx9
Joloxx9OP5mo ago
first is on NAS(HDD), second on SSD(server) both are mounted:
Joloxx9
Joloxx9OP5mo ago
No description
Joloxx9
Joloxx9OP5mo ago
and still same error with no access, when I change access to 777 on /data/immich it changes it back to what you can see above
Zeus
Zeus5mo ago
That’s fine, Postgres is setting the permissions What’s the actual issue now then? Also what’s the filesystem of that disk
Joloxx9
Joloxx9OP5mo ago
ext4 issue is I constantly got this error:
Joloxx9
Joloxx9OP5mo ago
No description
Zeus
Zeus5mo ago
Please post the DB logs
Joloxx9
Joloxx9OP5mo ago
PostgreSQL Database directory appears to contain a database; Skipping initialization 2024-12-23 14:30:49.976 GMT [1] FATAL: 0 8kB is outside the valid range for parameter "shared_buffers" (16 .. 1073741823) there is jsut that one line ok
Zeus
Zeus5mo ago
Why does your compose not have a command line for Postgres?
Joloxx9
Joloxx9OP5mo ago
got error I did not put my docker compose here, the one above is not what I used I have finished with the one from github as I was setting up everything in portainer
Zeus
Zeus5mo ago
You posted it here ?
Joloxx9
Joloxx9OP5mo ago
it was my fault
Zeus
Zeus5mo ago
Ok lol well post the new one
Joloxx9
Joloxx9OP5mo ago
I changed this line Sorry wrong
Joloxx9
Joloxx9OP5mo ago
No description
Joloxx9
Joloxx9OP5mo ago
I deleted "M" by mistake lol....
Zeus
Zeus5mo ago
Yep idk how you did that lol
Joloxx9
Joloxx9OP5mo ago
I changed from 512 to 4096 and accidentally deleted M lol anyway, working like a charm 😄
Zeus
Zeus5mo ago
You probably shouldn’t change stuff like that That’s a big shared buffer
Joloxx9
Joloxx9OP5mo ago
you think? I will revert them to previous values then 🙂 thanks for help
Immich
Immich5mo ago
This thread has been closed. To re-open, use the button below.

Did you find this page helpful?