immich-app / immich

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

Cant delete images #9260

Closed BoBBer446 closed 4 months ago

BoBBer446 commented 4 months ago

The bug

Cant delete Imaghes. Select 91 and click 3 dots > delete

image

i get 0 trashed image

Maybe because the image is here: /var/lib/docker/bindmounts/ext_photos/rene

env file as: EXTERNAL_PATH_RENE

    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH_RENE}:/usr/src/app/external/rene

Maybe because no permissions to delete, it is a External Library ?

The OS that Immich Server is running on

ubuntu 22.04, docker

Version of Immich Server

v1.103.0

Version of Immich Mobile App

latest

Platform with the issue

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH_RENE}:/usr/src/app/external/rene
      - ${EXTERNAL_PATH_JULIANE}:/usr/src/app/external/juliane
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - ${EXTERNAL_PATH_RENE}:/usr/src/app/external/rene
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

UPLOAD_LOCATION=/var/lib/docker/bindmounts/immich
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis
EXTERNAL_PATH_RENE=/var/lib/docker/bindmounts/ext_photos/rene

Reproduction steps

Use this settings and try to delete

Relevant log output

root@ab534b71c6a0:~# cd /var/log/
root@ab534b71c6a0:/var/log# ls
alternatives.log  apt  btmp  dpkg.log  faillog  fontconfig.log  lastlog  wtmp
root@ab534b71c6a0:/var/log# cat faillog
root@ab534b71c6a0:/var/log# cat lastlog
root@ab534b71c6a0:/var/log# cat alternatives.log
update-alternatives 2024-04-04 14:08:22: run with --install /usr/bin/lzma lzma /usr/bin/xz 20 --slave /usr/share/man/man1/lzma.1.gz lzma.1.gz /usr/share/man/man1/xz.1.gz --slave /usr/bin/unlzma unlzma /usr/bin/unxz --slave /usr/share/man/man1/unlzma.1.gz unlzma.1.gz /usr/share/man/man1/unxz.1.gz --slave /usr/bin/lzcat lzcat /usr/bin/xzcat --slave /usr/share/man/man1/lzcat.1.gz lzcat.1.gz /usr/share/man/man1/xzcat.1.gz --slave /usr/bin/lzmore lzmore /usr/bin/xzmore --slave /usr/share/man/man1/lzmore.1.gz lzmore.1.gz /usr/share/man/man1/xzmore.1.gz --slave /usr/bin/lzless lzless /usr/bin/xzless --slave /usr/share/man/man1/lzless.1.gz lzless.1.gz /usr/share/man/man1/xzless.1.gz --slave /usr/bin/lzdiff lzdiff /usr/bin/xzdiff --slave /usr/share/man/man1/lzdiff.1.gz lzdiff.1.gz /usr/share/man/man1/xzdiff.1.gz --slave /usr/bin/lzcmp lzcmp /usr/bin/xzcmp --slave /usr/share/man/man1/lzcmp.1.gz lzcmp.1.gz /usr/share/man/man1/xzcmp.1.gz --slave /usr/bin/lzgrep lzgrep /usr/bin/xzgrep --slave /usr/share/man/man1/lzgrep.1.gz lzgrep.1.gz /usr/share/man/man1/xzgrep.1.gz --slave /usr/bin/lzegrep lzegrep /usr/bin/xzegrep --slave /usr/share/man/man1/lzegrep.1.gz lzegrep.1.gz /usr/share/man/man1/xzegrep.1.gz --slave /usr/bin/lzfgrep lzfgrep /usr/bin/xzfgrep --slave /usr/share/man/man1/lzfgrep.1.gz lzfgrep.1.gz /usr/share/man/man1/xzfgrep.1.gz
update-alternatives 2024-04-04 14:08:22: link group lzma updated to point to /usr/bin/xz
update-alternatives 2024-04-04 14:08:22: run with --quiet --install /usr/bin/pinentry pinentry /usr/bin/pinentry-curses 50 --slave /usr/share/man/man1/pinentry.1.gz pinentry.1.gz /usr/share/man/man1/pinentry-curses.1.gz
update-alternatives 2024-04-04 14:08:22: link group pinentry updated to point to /usr/bin/pinentry-curses
update-alternatives 2024-04-04 14:08:39: run with --quiet --remove pinentry /usr/bin/pinentry-curses
update-alternatives 2024-04-04 14:08:39: link group pinentry fully removed
update-alternatives 2024-04-04 14:08:40: run with --remove lzma /usr/bin/xz
update-alternatives 2024-04-04 14:08:40: link group lzma fully removed
update-alternatives 2024-04-04 14:08:48: run with --quiet --install /usr/bin/pinentry pinentry /usr/bin/pinentry-curses 50 --slave /usr/share/man/man1/pinentry.1.gz pinentry.1.gz /usr/share/man/man1/pinentry-curses.1.gz
update-alternatives 2024-04-04 14:08:48: link group pinentry updated to point to /usr/bin/pinentry-curses
update-alternatives 2024-04-04 14:08:53: run with --quiet --remove pinentry /usr/bin/pinentry-curses
update-alternatives 2024-04-04 14:08:53: link group pinentry fully removed
root@ab534b71c6a0:/var/log#

Additional information

if i join the container i can delete on externel storage:

root@ab534b71c6a0:/usr/src/app/external/rene/date-unknown# rm -rf 7b8d2e8ebed00e5661ab41471bf8994d85021e9d.jpg
root@ab534b71c6a0:/usr/src/app/external/rene/date-unknown#
bo0tzz commented 4 months ago

Deleting from external libraries is not supported.

BoBBer446 commented 4 months ago

is there a way copy / import this into a space there it is possible to delete ?

just move it from /usr/src/app/external/rene to /usr/src/app/upload/upload/f33fa5f5-c45a-4e94-8204-4804719350bc ?

mmomjian commented 4 months ago

You can import it using the CLI. Or, you can wait, the a future version I believe will include the ability to delete from external.

jrasm91 commented 4 months ago

Deleting from external libraries is not supported.

It actually is, just not released yet 😁

BoBBer446 commented 4 months ago

just not released yet

Ist there a way to activate it? Alternate i have to umount external library and move it to external HDD and delete there.

alextran1502 commented 4 months ago

@BoBBer446 Just patiently waiting for the release 😃 it will be sometimes next week