Otherwise there is an issue when resizing a volume with pending changes:
1. Have a running container with a mount point
2. Edit the mount point and change the path
3. Resize the mount point
4. Reboot the container
Result: the old size is written to the config.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Tested-by: Oguz Bektas <o.bektas@proxmox.com>
my $rescan_volume = sub {
my ($storecfg, $mp) = @_;
eval {
- $mp->{size} = PVE::Storage::volume_size_info($storecfg, $mp->{volume}, 5)
- if !defined($mp->{size});
+ $mp->{size} = PVE::Storage::volume_size_info($storecfg, $mp->{volume}, 5);
};
warn "Could not rescan volume size - $@\n" if $@;
};