Immich fails to start after migrating to new dataset structure (pgvecto permission error) - TRUENAS
Hi all,
I’ve recently migrated Immich to the new storage layout, and assigned Machine Learning Cache to HostPath. I made sure to follow the guidance and created regular folders (not datasets) under:
/mnt/immich/data/
/mnt/immich/data/
Immich version -
App Version: v1.134.0, Version: v1.9.2
App Version: v1.134.0, Version: v1.9.2
TRUENAS -
25.04.1
25.04.1
Everything seems to be correctly structured and permissions looked fine at first glance. However, when I try to start the app, I get the following error:
Failed 'up' action for 'immich' app:Container ix-immich-permissions-1 ExitedContainer ix-immich-pgvecto-1 is unhealthydependency failed to start: container ix-immich-pgvecto-1 is unhealthy
Failed 'up' action for 'immich' app:Container ix-immich-permissions-1 ExitedContainer ix-immich-pgvecto-1 is unhealthydependency failed to start: container ix-immich-pgvecto-1 is unhealthy
The logs from ix-immich-pgvecto-1 show:
2025-06-19 10:56:24.294750+00:002025-06-19T10:56:24.294750495Z2025-06-19 10:56:31.111201+00:00Using SSD storage2025-06-19 10:56:31.119858+00:00chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted2025-06-19 10:56:31.138821+00:00The files belonging to this database system will be owned by user "postgres".2025-06-19 10:56:31.138850+00:00This user must also own the server process.2025-06-19 10:56:31.138873+00:002025-06-19T10:56:31.138873999Z2025-06-19 10:56:31.138890+00:00The database cluster will be initialized with locale "en_US.utf8".2025-06-19 10:56:31.138896+00:00The default database encoding has accordingly been set to "UTF8".2025-06-19 10:56:31.138901+00:00The default text search configuration will be set to "english".2025-06-19 10:56:31.138902+00:00initdb: error: could not access directory "/var/lib/postgresql/data": Permission denied2025-06-19 10:56:31.138907+00:002025-06-19T10:56:31.138907102Z2025-06-19 10:56:31.138936+00:00Data page checksums are disabled.
2025-06-19 10:56:24.294750+00:002025-06-19T10:56:24.294750495Z2025-06-19 10:56:31.111201+00:00Using SSD storage2025-06-19 10:56:31.119858+00:00chmod: changing permissions of '/var/lib/postgresql/data': Operation not permitted2025-06-19 10:56:31.138821+00:00The files belonging to this database system will be owned by user "postgres".2025-06-19 10:56:31.138850+00:00This user must also own the server process.2025-06-19 10:56:31.138873+00:002025-06-19T10:56:31.138873999Z2025-06-19 10:56:31.138890+00:00The database cluster will be initialized with locale "en_US.utf8".2025-06-19 10:56:31.138896+00:00The default database encoding has accordingly been set to "UTF8".2025-06-19 10:56:31.138901+00:00The default text search configuration will be set to "english".2025-06-19 10:56:31.138902+00:00initdb: error: could not access directory "/var/lib/postgresql/data": Permission denied2025-06-19 10:56:31.138907+00:002025-06-19T10:56:31.138907102Z2025-06-19 10:56:31.138936+00:00Data page checksums are disabled.
I did not have this error with the old storage configuration and these are some of the settings in my truenas for immich app
Dataset type: SSD User ID - 0, and Group ID - 0 App storage paths: Data: