v0.11.0 — Phase C: Storage Init Wizard, Data Migration & Startup Fix
- Startup ping: fire heartbeat + health + hub report immediately on boot
(5s delay after scheduler start, instead of waiting 5-15 min for first tick)
- Storage init wizard: new internal/storage/ package with disk scanning
(lsblk -J), format+mount pipeline (sfdisk → mkfs.ext4 → blkid → fstab →
mount → chown), safety guards (system disk detection, confirmation "FORMÁZÁS"),
progress channel, auto-register in settings.json
- Data migration: MigrateAppData() with rsync --info=progress2 progress parsing,
stop/rsync/update-config/start flow, rollback on failure, old data preserved
- New pages: /settings/storage/init (wizard), /stacks/{name}/migrate (migration)
- New API routes: /api/storage/{scan,init,init/status,migrate,migrate/status}
- Deploy page: storage info section for deployed apps (path, size, free, migrate link)
- Settings page: "Mozgatás" button per app in storage path details
- Container: privileged: true, /dev:/dev, /etc/fstab:/host-fstab, /run/udev:/run/udev:ro
- Dockerfile: add util-linux, e2fsprogs, rsync, parted for disk ops
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package storage
|
||||
|
||||
// BlockDevice represents a detected physical disk.
|
||||
type BlockDevice struct {
|
||||
Name string // "sdb"
|
||||
Path string // "/dev/sdb"
|
||||
Size string // "931.5G"
|
||||
SizeBytes int64 // raw bytes from lsblk
|
||||
Model string // "WD Elements 25A2"
|
||||
Type string // "disk"
|
||||
Removable bool // true for USB
|
||||
Partitions []Partition // child partitions
|
||||
Mounted bool // any partition is mounted
|
||||
}
|
||||
|
||||
// Partition represents a partition on a block device.
|
||||
type Partition struct {
|
||||
Name string // "sdb1"
|
||||
Path string // "/dev/sdb1"
|
||||
Size string // "931.5G"
|
||||
SizeBytes int64
|
||||
FSType string // "ext4", "" for no filesystem
|
||||
Label string // filesystem label
|
||||
UUID string
|
||||
MountPoint string // "" if not mounted
|
||||
}
|
||||
|
||||
// ScanResult from disk detection.
|
||||
type ScanResult struct {
|
||||
AvailableDisks []BlockDevice // Unmounted, non-system disks
|
||||
SystemDisks []BlockDevice // System/mounted disks (display only)
|
||||
}
|
||||
Reference in New Issue
Block a user