Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage reporting is still shows wrong size #9514

Open
3 tasks done
picarica opened this issue May 15, 2024 · 4 comments
Open
3 tasks done

Storage reporting is still shows wrong size #9514

picarica opened this issue May 15, 2024 · 4 comments

Comments

@picarica
Copy link

The bug

my web ui installed within truenas shows 256kb of usage even when 600 pictures and several 100gb videos uploaded
i saw this issue #2462 and saw it was solved? but it doesnt seem like #2560 i thought this was a fix too, but sitll not
my behavior is same as in this 2 months old reddit thread https://www.reddit.com/r/immich/comments/1b4ai01/real_capacity_of_immich_with_truenas/

The OS that Immich Server is running on

TrueNAS-SCALE-24.04.0

Version of Immich Server

v1.105.1

Version of Immich Mobile App

not relevant

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

not sure truenas default

Your .env content

not sure

Reproduction steps

1. install truenas
2. install immich
3. issue exists

Relevant log output

No response

Additional information

with truenas i am using default ixvolumes i wonder if host path would be used if it would fix the issue

@mertalev
Copy link
Contributor

I think this might be a quirk of ZFS since everything is on a separate dataset. We only look at the library folder to get disk usage info, so in this case the used space is just the size of the library folder. I'm not sure what the best way to fix this would be.

@picarica
Copy link
Author

idk this may sound amateurish but just getting size with du and report it to GUI? should work on zfs no ?

@mdafer
Copy link

mdafer commented May 23, 2024

One workaround, that worked for me (using geesefs to mount S3 buckets as local storage), is to set a quota limit on your account. Eg. instead of unlimited, use 100 TB for example. This way I can now see the used storage out of the limit.

Using du could deteriorate performance pretty quickly for us (who mount different kinds of storage, especially Object stores such as minio or s3), in my case, it could take hours to traverse the whole tree and get the total size.

I haven't checked how the size is being calculated when a limit is set, and I could be mistaken, but I'm assuming that it's calculated from the meta in Immich rather than from storage as I'm pretty sure it would be much slower to do it accurately from storage in my case.

@mertalev
Copy link
Contributor

I'm assuming that it's calculated from the meta in Immich rather than from storage

This is right. Usage is stored in the DB and updated when assets are added or deleted.

I suppose we could change to display the immich library size instead of the disk size. The latter is hard to get right since you can mount different drives for each folder, filesystems can handle usage differently, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants