orphan files/folders on harddrive
- Dominant language
- Go
- Stars
- 2.1k
- Forks
- 274
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 103
Description
## Describe the bug
My instance uses much more storage on the disk than expected. When looking into what files use the space I found files on the disk that I have deleted in ocis e.g. `storage/users/spaces/00/7f0f4e-cb0c-4d60-a229-180920aa97ec/blobs/97/79/ab/b8/-bbea-4d25-bee8-d418129a5568`
The messagepack of that file has this content:
```
{
"user.ocis.blobid": "9779abb8-bbea-4d25-bee8-d418129a5568",
"user.ocis.blobsize": "10139136",
"user.ocis.cs.adler32": "\ufffdLwv",
"user.ocis.cs.md5": "\u0014\ufffd\ufffd{\ufffdĮH\ufffd@0\ufffdh\ufffd\ufffd\ufffd",
"user.ocis.cs.sha1": "\ufffd\ufffd\ufffd\u001f\u0015\ufffdENlJu\ufffd\ufffd\u001c˲Ssp\ufffd",
"user.ocis.name": "P1120390.JPG",
"user.ocis.parentid": "dbd28bd2-27fb-4f8c-92b7-40fa31753e37",
"user.ocis.type": "1"
}
```
I can find it's parent on disk:
```
ls ./storage/users/spaces/00/7f0f4e-cb0c-4d60-a229-180920aa97ec/nodes/db/d2/8b/d2/-27fb-4f8c-92b7-40fa31753e37 -lh
total 0
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:30 P1120306-Glückwunsch.JPG -> ../../../../../b1/10/38/22/-880f-439d-956e-9135ef9af288
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120306.JPG -> ../../../../../41/d4/bb/fa/-0580-4732-a28e-f5c228bbdb98
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120307.JPG -> ../../../../../88/2c/73/2f/-83d0-4dee-bd1e-d727069bb5f2
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120309.JPG -> ../../../../../cb/39/0b/2f/-41d6-40c9-8581-9e93b6ac4e43
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120313.JPG -> ../../../../../f3/f5/4d/fc/-8078-4ae6-9af3-2d5cf7bcdd2d
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120315.JPG -> ../../../../../11/5c/28/03/-087e-4522-ade0-1d73c21007f5
lrwxrwxrwx 1 arturproxy arturproxy 55 Jul 4 11:31 P1120317.JPG -> ../../../../../5f/d5/19/0a/-c019-4a92-adbd-830daf8af264
....
```
The parent has this messagepack content:
```
{
"user.ocis.name": "2022-04-18-22-Bandipur-Urlaub",
"user.ocis.parentid": "4629d530-c6f7-4fdf-ab4c-8ce3025a9d9c",
"user.ocis.propagation": "1",
"user.ocis.tmp.etag": "",
"user.ocis.tmtime": "2023-07-04T09:36:22.416708035Z",
"user.ocis.treesize": "951625660",
"user.ocis.type": "2"
}
```
These are files that I have deleted previously, including the folder.
I cannot find that folder or the files in the ocis webUI, nor the but not the grand-parent with the id `4629d530-c6f7-4fdf-ab4c-8ce3025a9d9c` anywhere on disk
## Steps to reproduce
Not sure! But I have uploaded a lot of files, generated previews (what sometimes crashed), deleted files, created & deleted spaces
## Expected behavior
no orphan files/folders on harddrive
## Actual behavior
orphan files/folders exist on the harddrive
## Setup
docker compose
```yml
---
version: "3.7"
services:
ocis:
image: owncloud/ocis:${OCIS_DOCKER_TAG:-latest}
networks:
ocis-net:
ports:
- "9200:9200"
entrypoint:
- /bin/sh
command: [ "-c", "ocis init || true; ocis server" ]
environment:
OCIS_URL: https://${OCIS_DOMAIN:-ocis.in-nepal.de}
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-info}
OCIS_LOG_COLOR: "${OCIS_LOG_COLOR:-false}"
OCIS_INSECURE: true
PROXY_HTTP_ADDR: 0.0.0.0:9200
PROXY_TLS: false
OCIS_CACHE_STORE: "redis"
OCIS_CACHE_STORE_NODES: "cache:6379"
OCIS_LOG_FILE: /var/log/ocis/ocis.log
restart: always
depends_on:
- cache
volumes:
- type: bind
source: /mnt/HC_Volume_32687865/ocis-config
target: /etc/ocis
- type: bind
source: /mnt/HC_Volume_32687865/ocis-data
target: /var/lib/ocis
- type: bind
source: /mnt/HC_Volume_32687865/ocis-logs
target: /var/log/ocis
cache:
image: redis:6.2-alpine
restart: always
networks:
ocis-net:
volumes:
- cache:/data
networks:
ocis-net:
volumes:
cache:
driver: local
```
## Additional context
Add any other context about the problem here.
Contributor guide
Assessment
This issue has not been assessed yet.