mirror of https://github.com/digint/btrbk
btrbk: handle errors from btrfs filesystem usage
Fix `btrbk usage` unhandled error case if usage data cannot be retrieved, e.g.: ERROR: Failed to fetch btrfs filesystem usage for: example.com:/mnt/btr_pool ERROR: ... sh: ssh -i 'XXX' btrbk@example.com 'btrfs-filesystem-usage '\''/mnt/btr_pool'\''' ERROR: ... cannot access '/mnt/btr_pool': Permission deniedpull/459/head
parent
0388cf4b2d
commit
31ce14e4c2
2
btrbk
2
btrbk
|
@ -6439,7 +6439,7 @@ MAIN:
|
|||
return unless($mountpoint);
|
||||
my $mount_source = $mountpoint->{mount_source};
|
||||
my $mid = $vol->{MACHINE_ID} . $mount_source;
|
||||
$usage_cache{$mid} //= btrfs_filesystem_usage($vol);
|
||||
$usage_cache{$mid} //= btrfs_filesystem_usage($vol) // {};
|
||||
push @data, { %{$usage_cache{$mid}},
|
||||
type => $type,
|
||||
mount_source => $mount_source,
|
||||
|
|
Loading…
Reference in New Issue