fix storage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user