Immich new storage configuration & thumbs location

Hello,
I mounted an SSD in my TrueNAS system and I’d like to install Immich app on the SSD, with thumbnails stored there as well. The rest of the data will be located on the HDD.
How can I do that with new storage configuration where I have only
*Data Storage (aka Upload Location) and
*Postgres Data Storage ?"

Important to add that I want to install Immich from Truenas catalog
Thank you in advance for help

The thumbnails are on the HDD in the data dataset. Separately is no longer possible as far as I can see, not if you want to use the App catalog. But given that Immich is actively developed, you never know when that changes :slight_smile:

But how big is your library and thus the thumbs?
The system is quick enough on the HDD I noticed. I migrated from the old system to the new and thus moved my thumbnails from the SSD to the HDD. (about 100,000 images)

Thank you for reply.
So far my database is around 700GB but when I use VPN to access to my Immich it take too much time… so this is the major reason why I mounted additional SSD

700GB database meaning images or thumbnails only? My library is 2TB.
Unless you have only 1 drive, any RAIDZ will provide pretty nice read speeds.
I think your bottleneck might not be the HDD but your upload speed of your ISP and/or VPN. My thumbnails load pretty nice on 4G (my ISP only has 30Mbit upload though)

I have RAID1 and upload 20MB… but even in my local network loading thumbs take time

btw now idk why I cannot see any photos (after update immich) even via android app or website

1 Like

@dzik so i am in the same situation, i migrate from the old storage config layout ( multiple datasets ) to the new layout ( 2 datasets ). With the given App Catalog and without dockge&Co. you are not able to overwrite the .env variable for the custom paths.

So either i go back to the obsolete multiple dataset config where i have everythign on SSD beside the library itself or i put everythign on spinning disk.

Whats your take?

I have managed to get it to work just like I’d like it to on the Immich stable version (2.0 and above).

Initially I had all the Immich folders on a SSD pool but have retrospectively changed things successfully so that just the thumbs and profile folders remain on a SSD pool while library, upload, encoded-video, and backups now live on a HDD pool. The postgres db continues to live on the SSD pool. The same steps below with some exclusions also work for fresh installs.

Important Notes:

  1. If you are undertaking a fresh install from the catalogue, ignore the remaining points in this section and skip all the steps related to copying data.
  2. Make sure you stop Immich before making any of these changes.
  3. Make sure you don’t delete anything from the SSD pool until you are satisfied that everything works as you’d like to.
  4. It is also a good idea to ensure that you are any other users do not make any changes to Immich while this change is being made. So, close the app on your phones, etc.

Steps:

  1. Create four datasets using the Apps preset on the HDD pool that you’d like to use for library, upload, encoded-video, and backups. While this should be enough, just double check to make sure that the Apps user (or whichever user you have setup instead for that job) has Modify access to each of these.
  2. Run the following commands to copy contents from the SSD pool into to respective folders on the HDD pool. You will need to tailor them to make sure the paths are correct for your setup. You can add “–dry-run” at the end of the first line just before the “\” if you’d like to check everything works OK but since you’re just copying stuff, this is optional.

Even if you think you don’t have any data in one or more of the folders that you want to move from the SSD pool to the HDD pool, you still need to run the rsync command. In my case, there was only 13 bytes of data in the uploads and library folders but that is what caused Immich to remain stuck in a deploying loop.

sudo rsync -aHAXh --numeric-ids --progress \ 
/mnt/<your ssd pool name>/<rest of the path to current upload folder>/ \ 
/mnt/<your hdd pool name>/<rest of the path to newly created upload folder>/
sudo rsync -aHAXh --numeric-ids --progress \ 
/mnt/<your ssd pool name>/<rest of the path to current encoded-video folder>/ \ 
/mnt/<your hdd pool name>/<rest of the path to newly created encoded-video folder>/
sudo rsync -aHAXh --numeric-ids --progress \ 
/mnt/<your ssd pool name>/<rest of the path to current library folder>/ \ 
/mnt/<your hdd pool name>/<rest of the path to newly created library folder>/
sudo rsync -aHAXh --numeric-ids --progress \ 
/mnt/<your ssd pool name>/<rest of the path to current backups folder>/ \ 
/mnt/<your hdd pool name>/<rest of the path to newly created backups folder>/
  1. On your Immich server, edit the Immich app to make the following changes under the Storage Configuration section for the folders you’d like to keep in the HDD pool. Note that the data and pgdata folders remain mounted as per the usual installation instructions (in my case, both remain on the SSD pool).
  • Under additional storage, add four more locations (one for each folder you are moving and/or want on the HDD pool). As an example, here is what this looks like for the encoded-video folder - repeat this for all others.

Type: Host Path (Path that already exists on the system)

Mount Path*: /data/encoded-video

Host Path*: /mnt///

Once you’ve done this for all the other folders you want on the HDD pool, that’s it! Start Immich and enjoy.