scan_zfs: ignore subvolumes generated by our ZFSPoolPlugin
This commit is contained in:
@ -996,6 +996,8 @@ sub scan_zfs {
|
|||||||
my ($pool, $size_str, $used_str) = ($1, $2, $3);
|
my ($pool, $size_str, $used_str) = ($1, $2, $3);
|
||||||
my $size = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($size_str);
|
my $size = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($size_str);
|
||||||
my $used = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($used_str);
|
my $used = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($used_str);
|
||||||
|
# ignore subvolumes generated by our ZFSPoolPlugin
|
||||||
|
return if $pool =~ m!/subvol-\d+-[^/]+$!;
|
||||||
push @$res, { pool => $pool, size => $size, free => $size-$used };
|
push @$res, { pool => $pool, size => $size, free => $size-$used };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user