From d5442f2c36b35e8ce920bb808b9898a143b7f721 Mon Sep 17 00:00:00 2001 From: Sergei Poljanski Date: Thu, 12 Nov 2026 22:52:12 +0400 Subject: [PATCH] s3fs: turn it off on asxpio-services too The mounts were only ever read by one-off migration scripts, and their cache had grown to 9.7 GB. restic and the bucket replica talk to object storage directly, so nothing needs a filesystem view of the buckets. Disable s3fs like on asxpio-ops; the bootstrap playbook unmounts and drops the fstab lines (applied by hand, cache removed). The playbook still created Immich directories under the mount and its summary needed the cache size, which a disabled host no longer sets. Assisted-by: Claude:opus-5-5 --- .../inventory/host_vars/asxpio-services.yaml | 4 +- ansible/playbooks/03-setup-s3fs.yaml | 64 ++----------------- 2 files changed, 9 insertions(+), 59 deletions(-) diff --git a/ansible/inventory/host_vars/asxpio-services.yaml b/ansible/inventory/host_vars/asxpio-services.yaml index 50000e7..9cbeb2d 100644 --- a/ansible/inventory/host_vars/asxpio-services.yaml +++ b/ansible/inventory/host_vars/asxpio-services.yaml @@ -5,7 +5,9 @@ wireguard_ip: "{{ asxpio_services_wireguard_ip }}" ssh_allow_public_git: false -s3fs_ensure_diskfree: 81920 # 80 GB free = max 80 GB cache +# s3fs is off: its cache took ~10 GB and nothing reads the mounts any more; +# restic and s3_replicate talk to object storage directly +s3fs_enabled: false # restic: ejabberd's Mnesia through its own backup command, its SQLite # through the online backup API. The Paper world is copied live (RCON is diff --git a/ansible/playbooks/03-setup-s3fs.yaml b/ansible/playbooks/03-setup-s3fs.yaml index 73e95ef..999fa07 100644 --- a/ansible/playbooks/03-setup-s3fs.yaml +++ b/ansible/playbooks/03-setup-s3fs.yaml @@ -72,63 +72,11 @@ ansible.builtin.debug: msg: "{{ df_output.stdout_lines | select('search', 's3fs') | list }}" - - name: Create immich library directory structure - ansible.builtin.file: - path: "{{ item }}" - state: directory - mode: '0775' - owner: root - group: docker - loop: - - /mnt/s3/immich/library - - /mnt/s3/immich/library/backups - - /mnt/s3/immich/library/encoded-video - - /mnt/s3/immich/library/library - - /mnt/s3/immich/library/profile - - /mnt/s3/immich/library/thumbs - - /mnt/s3/immich/library/upload - when: inventory_hostname in groups['services_servers'] - - name: Display post-setup information ansible.builtin.debug: - msg: | - ======================================== - S3FS Setup Complete on {{ inventory_hostname }}! - ======================================== - - ✅ All S3 buckets mounted successfully - - Mount points: - {% for bucket in s3_buckets %} - - {{ bucket.mount_point }} ({{ bucket.name }}) - {% endfor %} - - Cache configuration: - - Location: /var/cache/s3fs - - Max size: ~{{ (40 - (s3fs_ensure_diskfree / 1024)) | int }}GB - - Free space reserved: {{ (s3fs_ensure_diskfree / 1024) | int }}GB - - {% if inventory_hostname in groups['services_servers'] %} - Immich library structure created at: - /mnt/s3/immich/library/ - ├── backups/ - ├── encoded-video/ - ├── library/ - ├── profile/ - ├── thumbs/ - └── upload/ - - Next steps for Immich migration: - 1. Manually sync data from legacy server: - rsync -avz --info=progress2 \ - asxpio-old:/srv/immich/library/ \ - /mnt/s3/immich/library/ - - 2. Backup Immich PostgreSQL database on legacy server: - docker exec immich_postgres pg_dumpall -U postgres | gzip > /tmp/immich-db.sql.gz - - 3. Deploy Immich service configured to use S3 storage: - IMMICH_MEDIA_LOCATION=/mnt/s3/immich/library - {% endif %} - - ======================================== + msg: >- + {% if s3fs_enabled | default(true) | bool %}s3fs mounts on {{ inventory_hostname }}: + {{ s3_buckets | map(attribute='mount_point') | join(', ') }}, cache in + /var/cache/s3fs ({{ (s3fs_ensure_diskfree / 1024) | int }} GB kept free) + {% else %}s3fs is disabled on {{ inventory_hostname }}: mounts and + fstab lines removed{% endif %}