4 Commits

Author SHA1 Message Date
timansky 63cf0b6641 Removed unnecesary if (#61) 2025-03-27 01:52:54 +05:00
timansky 5423702ade Increase timeout; Added additional check (#61) 2025-03-26 14:33:57 +05:00
Timur Kumakbayev 0aebefe4d3 Merge pull request #62 from plieven/fix/snap_mount
fix: error out if snapname is set in filesystem_path
2025-03-26 12:06:35 +05:00
Peter Lieven e0fcb81e69 fix: error out if snapname is set in filesystem_path
Pure currently does not support direct mounting of snapshots.
As we currently silently ignore the snapname field at least error
out if we receive a non empty snapname. Its unclear if this is
still used as vzdump nowadays does live backups.

Signed-off-by: Peter Lieven <pl@dlhnet.de>
2025-03-19 17:16:34 +01:00
+12 -2
View File
@@ -892,6 +892,8 @@ sub filesystem_path {
my ( $class, $scfg, $volname, $snapname ) = @_;
print "Debug :: PVE::Storage::Custom::PureStoragePlugin::sub::filesystem_path\n" if $DEBUG;
die "Error :: filesystem_path: snapshot is not implemented ($snapname)\n" if defined($snapname);
# do we even need this?
my ( $vtype, undef, $vmid ) = $class->parse_volname( $volname );
@@ -1051,12 +1053,20 @@ sub map_volume {
};
# Wait for the device to appear
wait_for( $path_exists, "volume \"$volname\" to map" );
wait_for( $path_exists, "volume \"$volname\" to map", 30 );
# we might end up with operational disk but without multipathing, e.g.
# if unmapping was interrupted ('remove map' was already done, but slaves were not removed)
exec_command( [ 'multipathd', 'add', 'map', $wwid ] ) unless multipath_check( $wwid );
if ( !multipath_check( $wwid ) ) {
print "Debug :: Adding multipath map for device \"$wwid\"\n" if $DEBUG;
exec_command( [ 'multipathd', 'add', 'map', $wwid ] );
# Wait for multipath to be fully established
my $multipath_ready = sub {
return multipath_check( $wwid );
};
wait_for( $multipath_ready, "multipath map for volume \"$volname\" to be ready", 30 );
}
return $path;
}