Community-Lösung

Mount an External Drive for Immich on ZimaOS

A ZimaOS user could not create traditional /mnt mount points for four USB-connected HDDs. The thread clarified ZimaOS storage paths, Docker host/container mappings, and the two-step process for exposing an external drive to Immich.

If ZimaOS returns mkdir: cannot create directory '/mnt/...': Read-only file system, do not assume the external disk itself is broken. In the October 2025 IceWhale Community thread, the user was applying a conventional Linux /mnt workflow to ZimaOS, where the system filesystem and storage layout are managed differently.

The most useful lesson from the thread is to separate two jobs: first make sure ZimaOS has a stable host path for the external HDD, then map that host path into the Immich container. Immich can only validate an external library path that exists inside its container. Current Immich documentation still follows that same Docker principle, although it no longer requires the historical container path /external_library specifically.

Why /mnt Was Read-Only in the Community Case

The original author tried to create:

/mnt/terrabay1
/mnt/terrabay2
/mnt/terrabay3
/mnt/terrabay4

but ZimaOS returned:

mkdir: cannot create directory '/mnt/terrabay4': Read-only file system

Zima-Giorgio advised against directly modifying ZimaOS system files unless under expert guidance or in a test environment. The same reply pointed out that drives and shares managed by ZimaOS normally appear under paths beneath /media and can be listed from the terminal.

Check How ZimaOS Already Mounted the Drive

Before unmounting or editing /etc/fstab, inspect the current storage state:

lsblk -f
ls /media
df -h

In the source thread, ZimaOS had already exposed the four disks through paths similar to:

/media/sdb-ata-ST2000VN003-3CW1
/media/sdc-ata-ST2000VN003-3CW1

If the drive is already mounted and stable through ZimaOS, you may not need to remount it manually at all. The simplest Immich setup is often to use the existing ZimaOS host path as the left side of a Docker volume mapping.

The Historical Manual Mount Method Shared by the Author

The original author eventually documented a manual method using UUID-based /etc/fstab entries and mount points below /DATA. For example:

sudo mkdir -p /DATA/Enclosure/Bay1
sudo mount /dev/sdb /DATA/Enclosure/Bay1

and then an /etc/fstab line using a real disk UUID:

UUID=YOUR-REAL-UUID /DATA/Enclosure/Bay1 ext4 defaults,nofail,x-systemd.automount 0 0

followed by:

sudo systemctl daemon-reload
sudo mount -a

This was a community workaround on ZimaOS in 2025, not a universal current recommendation. Do not copy the thread's UUIDs or device names such as /dev/sdb; they belong to that user's hardware and can change.

A Small Typing Error Was Part of the Original Problem

The author later discovered that Apple Notes had automatically capitalized the first character of some copied command lines. Linux commands and paths are case-sensitive, so a command copied as Mkdir instead of mkdir, or a path with changed capitalization, will fail.

When preparing terminal commands, use a plain-text editor and verify capitalization before pasting.

Immich External Libraries Require Two Separate Steps

The later replies clarified the architecture:

  1. ZimaOS/Docker: map the external HDD's host path into the immich-server container.
  2. Immich: create an External Library using the container-side path from step 1.

If only step 2 is performed, Immich validation fails because the path does not exist inside its container.

The 2025 ZimaOS Example Used /external_library

Community member sny used a mapping conceptually like:

ZimaOS host path: /media/USB_1/sny
Immich path:      /external_library
ZimaOS Immich settings showing an external USB path mapped into the container
The community example mapped an existing ZimaOS host path into the Immich container before adding it as an external library.

Then in Immich the user added:

/external_library

as the External Library import path.

Immich external library configuration validating the container-side import path
Immich validates the path visible inside the container, not the original ZimaOS host path.

Current Immich Does Not Require the Name /external_library

Current Immich documentation is more flexible. Its official External Library guide shows arbitrary host and container paths, for example:

immich-server:
  volumes:
    - /home/user/photos1:/home/user/photos1:ro
    - /mnt/photos2:/mnt/photos2:ro

The important rule is that the path entered in Immich must match the container-side path exactly. The name /external_library was a convenient convention in the ZimaOS community example, not an upstream Immich requirement.

Prefer Read-Only Mounts for Archive Libraries

Current Immich documentation recommends adding :ro when the external library should only be read by Immich:

/host/photos:/external_library:ro

Remove read-only mode only if you intentionally want Immich to delete external assets or write XMP sidecar metadata. A read-only archive mount reduces the risk of an application modifying the original files.

Multiple External Libraries

The community suggested separate container paths such as:

/external_library/usb1
/external_library/usb2
/external_library/photos

Current Immich supports multiple mount points as well. Each library path must be mounted into immich-server and then added in Immich's External Libraries administration page.

Does Immich Copy External Library Photos Into Its Main Library?

No. Current Immich documentation describes external libraries as assets that remain in their original filesystem location. Immich scans them, indexes metadata, creates database records and derived assets such as thumbnails, and displays them in the timeline.

If an external file disappears from disk, Immich can mark the asset as missing or move it to trash after a rescan. Keep the external drive backed up independently.

Be Careful Editing /etc/fstab on ZimaOS

The source thread's manual method worked far enough to create stable drive paths, but the author later reported additional USB/migration issues. An invalid /etc/fstab entry can also interfere with boot or leave storage unavailable.

If ZimaOS already manages the disk and exposes a stable /media/... path, prefer using that existing path for the Immich bind mount instead of rebuilding the host's storage layout unnecessarily.

ZimaOS Immich External Drive Checklist

  1. Check lsblk -f, ls /media, and ZimaOS Storage first.
  2. Do not assume you need a traditional /mnt mount point.
  3. Prefer a ZimaOS-managed host path when one already exists.
  4. Map the host path into the immich-server container.
  5. Use a clear container path such as /external_library/photos.
  6. Use :ro when Immich only needs to read an archive.
  7. Add the exact container path under Immich Administration → External Libraries.
  8. Scan the new library and verify jobs are running.
  9. Back up original external-library files independently of Immich.

Immich External Drive on ZimaOS FAQ

Why can't I create /mnt/terrabay1 on ZimaOS?

In the source case, the ZimaOS system filesystem rejected writes there. ZimaOS already managed external storage through its own storage paths, including paths under /media.

Do I need to edit /etc/fstab?

Not always. The source author used fstab for a custom UUID-based mount layout, but if ZimaOS already mounts the drive reliably, using the existing host path is simpler and less invasive.

Must the Immich path be /external_library?

No. That was the ZimaOS community convention. Current Immich allows arbitrary mounted paths as long as the same container path is entered in External Library settings.

Does an Immich external library copy my originals?

No. The files remain in their original external location; Immich indexes them and creates associated metadata and derived assets.