fix storage

This commit is contained in:
2026-01-09 16:54:39 +00:00
parent dcb54c26ec
commit 7b91e0fd24
37 changed files with 3283 additions and 1227 deletions

View File

@@ -195,7 +195,7 @@ func (s *DiskService) getZFSPoolForDisk(ctx context.Context, devicePath string)
deviceName := strings.TrimPrefix(devicePath, "/dev/")
// Get all ZFS pools
cmd := exec.CommandContext(ctx, "zpool", "list", "-H", "-o", "name")
cmd := exec.CommandContext(ctx, "sudo", "zpool", "list", "-H", "-o", "name")
output, err := cmd.Output()
if err != nil {
return ""
@@ -208,7 +208,7 @@ func (s *DiskService) getZFSPoolForDisk(ctx context.Context, devicePath string)
}
// Check pool status for this device
statusCmd := exec.CommandContext(ctx, "zpool", "status", poolName)
statusCmd := exec.CommandContext(ctx, "sudo", "zpool", "status", poolName)
statusOutput, err := statusCmd.Output()
if err != nil {
continue