immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
43.92k stars 2.14k forks source link

Size on disk much larger than Immich reports #5885

Open bo0tzz opened 8 months ago

bo0tzz commented 8 months ago

Discussed in https://github.com/immich-app/immich/discussions/5884

Originally posted by **mpfl** December 20, 2023 > When looking in Immich-> Administration, it reports that it has 88GB of photos stored. > > However, in `library`: > > ``` > $ du -sh > 152G . > ``` > > I feel like a ~70GB discrepancy is a fair bit to be explained by filesystem overhead. > > Anyone know what's going on?

It seems like the statistics query only counts assets that are marked isVisible: https://github.com/immich-app/immich/blob/main/server/src/infra/repositories/user.repository.ts#L91-L92

danieldietzler commented 8 months ago

Yeah I've been recently talking with @jrasm91 about this in a different context and it's a little weird either way. I believe showing the total of all assets can also be confusing because then you upload e.g. 20GB and it shows you 22GB or something (live photos and stuff).

JustEnoughDucks commented 8 months ago

@danieldietzler

Especially when you bring zpools into the equation. Total disk space is always weird there. My photo library shows 51.1GB used of 139.3GB total while my photo directory is 25GB and by total free disk space in the pool has 204GB free. Though I suspect the "used" comes from a du -h type listing of the root mounted folder of the external + root of upload folder size as that correlates to the 51GB.

coltenkrauter commented 2 months ago

Perhaps immich should go the path that Apple went... Showing the whole story, but possibly use other or unkown when things are not photo/video media.

Screenshot 2024-07-04 at 3 12 44 PM