scan_zfs: ignore subvolumes generated by our ZFSPoolPlugin

This commit is contained in:
Dietmar Maurer
2015-08-28 11:01:41 +02:00
parent 3932390b11
commit 48e27f7937

View File

@ -996,6 +996,8 @@ sub scan_zfs {
my ($pool, $size_str, $used_str) = ($1, $2, $3);
my $size = PVE::Storage::ZFSPoolPlugin::zfs_parse_size($size_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 };
}
});