Add storage layout to Storage page and reference in installation guide

2026-03-08 06:58:05 +00:00
parent 173f7815c2
commit 8b9137659a
2 changed files with 36 additions and 6 deletions

@@ -2,7 +2,20 @@
Steps to set up a fresh Agap server from scratch. Steps to set up a fresh Agap server from scratch.
## 1. Network ## 1. Storage
Set up LVM volumes and mount points before anything else. See [[Storage]] for the full layout and LVM commands.
Required mount points:
| Mount | Purpose |
|-------|---------|
| `/mnt/ssd` | DB data, thumbnails, encoded video |
| `/mnt/backups` | All backups |
| `/mnt/misc` | Gitea data |
| `/mnt/media` | Immich photo originals |
## 2. Network
### Netplan (bridge) ### Netplan (bridge)
@@ -47,14 +60,14 @@ sudo systemctl enable --now caddy
- Ports **80** and **443** forwarded on the router (source and target, remote IP empty) - Ports **80** and **443** forwarded on the router (source and target, remote IP empty)
- Port **10051** forwarded for Zabbix active agent connections - Port **10051** forwarded for Zabbix active agent connections
## 2. GPU & Docker ## 3. GPU & Docker
```bash ```bash
sudo ./nvidia-docker-install.sh # Docker + NVIDIA Container Toolkit sudo ./nvidia-docker-install.sh # Docker + NVIDIA Container Toolkit
./install-cuda.sh # CUDA toolkit (no driver) ./install-cuda.sh # CUDA toolkit (no driver)
``` ```
## 3. Zabbix Agent (host) ## 4. Zabbix Agent (host)
Install agent and plugins: Install agent and plugins:
@@ -88,7 +101,7 @@ In Zabbix UI, link these templates to the `AgapHost` host:
- **Linux by Zabbix agent active** - **Linux by Zabbix agent active**
- **Nvidia by Zabbix agent 2 active** - **Nvidia by Zabbix agent 2 active**
## 4. Custom Zabbix UserParameters ## 5. Custom Zabbix UserParameters
Add backup monitoring to `/etc/zabbix/zabbix_agent2.d/gitea_backup.conf`: Add backup monitoring to `/etc/zabbix/zabbix_agent2.d/gitea_backup.conf`:
@@ -104,7 +117,7 @@ UserParameter=dbs.backup.age,f=/mnt/backups/dbs/.last_sync; [ -f "$f" ] && echo
UserParameter=immich.backup.age,f=/mnt/backups/media/.last_sync; [ -f "$f" ] && echo $(( $(date +%s) - $(stat -c %Y "$f") )) || echo -1 UserParameter=immich.backup.age,f=/mnt/backups/media/.last_sync; [ -f "$f" ] && echo $(( $(date +%s) - $(stat -c %Y "$f") )) || echo -1
``` ```
## 5. Root Cron Jobs ## 6. Root Cron Jobs
```bash ```bash
sudo crontab -e sudo crontab -e
@@ -117,7 +130,7 @@ Add:
30 3 * * * rsync -a --delete /mnt/ssd/dbs/ /mnt/backups/dbs/ >> /mnt/backups/dbs/cron.log 2>&1 && touch /mnt/backups/dbs/.last_sync 30 3 * * * rsync -a --delete /mnt/ssd/dbs/ /mnt/backups/dbs/ >> /mnt/backups/dbs/cron.log 2>&1 && touch /mnt/backups/dbs/.last_sync
``` ```
## 6. Services ## 7. Services
Start all Docker services: Start all Docker services:

@@ -2,6 +2,23 @@
Agap uses [LVM](https://wiki.archlinux.org/title/LVM). Agap uses [LVM](https://wiki.archlinux.org/title/LVM).
## Layout
| Disk | Size | VG | LV | Mount |
|------|------|----|----|-------|
| `nvme0n1` | 238GB | `ubuntu-vg` | `ubuntu-lv` | `/` (OS) |
| `sda` (SSD) | 447GB | `ssd1` | `main` | `/mnt/ssd` |
| `sdb` (HDD) | 931GB | `hdd1tb` | `backups` | `/mnt/backups` |
| `sdb` (HDD) | 931GB | `hdd1tb` | `misc` | `/mnt/misc` |
| `sdb` (HDD) | 931GB | `hdd1tb` | `media` | `/mnt/media` |
| Mount | Contents | Size |
|-------|----------|------|
| `/mnt/ssd` | DB data, thumbnails, encoded video | 447GB |
| `/mnt/backups` | All backups (gitea, dbs, media) | 400GB LV |
| `/mnt/misc` | Gitea data | 280GB LV |
| `/mnt/media` | Immich photo originals | 251GB LV |
## Common Commands ## Common Commands
First, create partition using `sudo fdisk /dev/sda`. First, create partition using `sudo fdisk /dev/sda`.