Files
hermes-ice/homelab/concepts/vm-storage-policy.md
Hermes Agent e4d91aadf9 Initial commit: homelab infrastructure wiki
- Full Obsidian vault content
- Host configs (ice, grizzley, ubuntu, proxmox, truenas, panda, hyte)
- Media stack documentation
- Traefik HA setup
- Automation scripts
- Bachelor party planning
2026-05-24 16:08:40 -07:00

61 lines
1.7 KiB
Markdown

---
title: VM Storage Policy
created: 2026-04-28
updated: 2026-04-28
type: concept
tags: [concept, storage, ubuntu, homelab]
confidence: high
---
# VM Storage Policy
Storage rules for application data on the Ubuntu host (192.168.50.61). All agents and developers managing services on Ubuntu MUST follow these rules.
## Rule 1: User-Uploaded Data on NFS
Store ALL user-uploaded data on TrueNAS NFS shares, NOT on the VM's local disk.
**Allowed NFS Paths:**
- `/mnt/PersonalMediaLibrary/` — Personal media, photos (Immich)
- `/mnt/truenas/mediadata/` — Media library (Movies, TV, Music)
- `/mnt/truenas-backup/` — Backups
**Examples:**
```yaml
volumes:
- /mnt/PersonalMediaLibrary/immich/upload:/usr/src/app/upload
- /mnt/truenas/mediadata/media:/media
```
## Rule 2: Config Files on VM
Configuration files, databases, and cached data CAN stay on VM local disk.
**Allowed Local Paths:**
- `/home/bear/homelab/ubuntu/{service}/` — Docker compose and config
- `./config`, `./cache` (relative to docker-compose) — Config/cache directories
## Rule 3: NFS Mounts Must Be in fstab
Before using an NFS path in docker-compose, verify it exists in `/etc/fstab` for persistence.
```bash
cat /etc/fstab | grep nfs
```
## Summary
| Data Type | Storage Location | Example |
|-----------|-----------------|---------|
| User uploads | NFS (TrueNAS) | Photos, media |
| App config | VM local | docker-compose.yml, config/ |
| Databases | VM local (postgres-shared) | PostgreSQL, Redis |
| Media library | NFS (TrueNAS) | Movies, TV, Music |
| Backups | NFS (TrueNAS) | Application backups |
## Related
- [[nfs-storage|NFS Storage]] — TrueNAS NFS mount strategy
- [[truenas|TrueNAS]] — network-attached storage host
- [[ubuntu|ubuntu]] — primary Docker host