Skip to content

Commit 5eafbe0

Browse files
authored
Merge pull request #313 from DialmasterOrg/docs/apple-mariadb
docs: add Apple Silicon troubleshooting for MariaDB virtiofs corruption
2 parents 2329ee4 + b566139 commit 5eafbe0

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,8 @@ Youtarr reads the `TZ` environment variable to determine when cron-based downloa
154154
- Already running MariaDB/MySQL elsewhere and do not want to use bundled internal DB?
155155
- See [docs/EXTERNAL_DB.md](docs/EXTERNAL_DB.md)
156156

157+
> **Apple Silicon note:** Docker Desktop’s `virtiofs` bind mounts can corrupt MariaDB’s bundled database and cause `Incorrect information in file: './youtarr/videos.frm'` errors. See [Troubleshooting → Apple Silicon](docs/TROUBLESHOOTING.md#apple-silicon-incorrect-information-in-file-errors) for the named-volume workaround.
158+
157159
### Deploying on Unraid
158160

159161
See [docs/UNRAID.md](docs/UNRAID.md) for instructions on Unraid setup.

docker-compose.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
- "${DB_PORT:-3321}:${DB_PORT:-3321}"
1919
volumes:
2020
- ./database:/var/lib/mysql
21+
# macOS (Apple Silicon): comment the line above and use the named volume example below to avoid the MariaDB+virtiofs bug (see README/Troubleshooting)
22+
# - youtarr-db-data:/var/lib/mysql
2123
- ./config/mariadb.cnf:/etc/mysql/conf.d/charset.cnf:ro
2224
command: --port=${DB_PORT:-3321} --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
2325
healthcheck:
@@ -75,3 +77,8 @@ services:
7577
networks:
7678
default:
7779
name: youtarr-network
80+
81+
# When switching the DB service to a named volume (Apple Silicon workaround),
82+
# remember to define it here:
83+
# volumes:
84+
# youtarr-db-data:

docs/TROUBLESHOOTING.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,41 @@ or
285285

286286
3. Verify database credentials in environment
287287

288+
### Apple Silicon: `Incorrect information in file` errors
289+
290+
**Problem**: On Apple Silicon (M1/M2/M3/M4) running Docker Desktop, MariaDB logs errors like:
291+
```
292+
ERROR 1033 (HY000): Incorrect information in file: './youtarr/videos.frm'
293+
```
294+
This happens whenever MariaDB touches tables stored on a bind-mounted host directory (our default `./database:/var/lib/mysql`). Docker Desktop shares bind mounts over `virtiofs`, and MariaDB 10.3 cannot reliably reopen InnoDB tables on that filesystem ([MariaDB issue #447](https://github.com/MariaDB/mariadb-docker/issues/447), [#481](https://github.com/MariaDB/mariadb-docker/issues/481)). Linux and WSL users are unaffected.
295+
296+
**Solution** (switch to a named Docker volume):
297+
1. Stop the stack: `./stop.sh` or `docker compose down`.
298+
2. Remove the old host directory (`./database`) so MariaDB can recreate a clean datadir inside the named volume:
299+
```bash
300+
sudo rm -rf ./database
301+
```
302+
3. Edit `docker-compose.yml`:
303+
```yaml
304+
services:
305+
youtarr-db:
306+
# Comment out the default bind mount line:
307+
# - ./database:/var/lib/mysql
308+
# And enable the named volume instead:
309+
- youtarr-db-data:/var/lib/mysql
310+
- ./config/mariadb.cnf:/etc/mysql/conf.d/charset.cnf:ro
311+
312+
volumes:
313+
youtarr-db-data:
314+
```
315+
4. Start Youtarr again (`./start.sh`). MariaDB will initialize inside `youtarr-db-data`, avoiding virtiofs entirely.
316+
317+
**Alternatives**:
318+
- Point Youtarr at an external MariaDB/MySQL instance via `./start-with-external-db.sh`.
319+
- Run the stack on Linux/WSL, which uses a native filesystem for bind mounts.
320+
321+
Once migrated, back up the database using `mysqldump` or `docker cp` instead of copying files from `./database`, since the named volume lives inside Docker’s VM.
322+
288323
## Download Issues
289324

290325
### Videos Not Downloading

0 commit comments

Comments
 (0)