USB External drive I/O error when immich container is running.
I have a USB hard drive connected to a debian linux server. Everything including database, uploads all are inside the harddrive. Both systemd for immich auto start and also drive mount using fstab on boot are setup.
For some time everything is okay, later then on the next opening of app/web, the storage used bar goes 0 of 0. Then I checked dmesg and found out hard drive goes to I/O error state. A reboot is required for immich to realise hard disk exists and this loops on. I also checked if it is a spin-down, bad device block issue, but those all are okay.
I docker compose down the container and put the system ON overnight and the drive was alright next day.
Need help with this.
21 Replies
:wave: Hey @Agent47,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :blue_square: verified I'm on the latest release(note that mobile app releases may take some time).
2. :blue_square: read applicable release notes.
3. :blue_square: reviewed the FAQs for known issues.
4. :blue_square: reviewed Github for known issues.
5. :blue_square: tried accessing Immich via local ip (without a custom reverse proxy).
6. :blue_square: uploaded the relevant information (see below).
7. :blue_square: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.I am on the latest release, and I think I didn’t have this issue on the v1.135.
I discovered this late, tried enabling this and still didn’t fix.

my .env file.

I wouldn't put the database on a harddrive, and certainly not an external one
(It will work fine on a hard drive, I just don't recommend it)
but the USB/external part is bad 🙂
Do database fetching cause heavy load on drive?
Will try changing database directory to internal storage
Is this a new install?
No, I installed it 2 months back.
If you change the database location you need to restore from backup, or it will make a new one.
automatic backups are in UPLOAD_LOCATION/backups, but you can make a manual one
You could try just moving the postgres folder while Immich is shut down, but we don't recommend that
https://immich.app/docs/administration/backup-and-restore/ for backup/restore 🙂
okay, I will follow this.
But will this fix the main issue I am having?
I'm not saying it's guarantueed but it will take a load off your HDD
okay, will try and get back. Thanks
FYI you hard drive is probably just dying / almost dead
You talk about IO errors and bad blocks. It’s on its last legs
There are no bad blocks @Zeus
log after the fail to load. From 2025-08-24 19:30:43.559280 , it fails to fetch totally
I just tried “cd into my mount directory” from SSH and it took a 20-30s time for it respond.
Database is still on hdd, I was checking one last time. @Mraedis
@Mraedis
That's uh... Not really an immich issue no
Changing database location out of hdd also didn’t work.
Finally as a temporary fix, I added a cron job to do an “ls “immich_location_in_hdd” every 30 minutes interval.
This fixed the issue.
what do you think? @Mraedis
Does your HDD go into sleep mode or something?
I think the hub I am using does something to save power. As I try ls command after immich shows problem, it takes some time to respond in the cli.
I spoke too soon. Again errored.
changed uas handling of the drive to usb-storage option.
Been past the usual error time. Hope this fixes it.🙏
Can I copy this folder of immich to ntfs hdd from the ext4 hdd. Will it cause any issues?
Database: No
Upload_Location: Yes