Handle nas backup and restore on Shared mount point. (#11204)

This commit is contained in:
Abhisar Sinha 2025-07-23 16:15:33 +05:30 committed by GitHub
parent d72a05aa5a
commit 0ebf72df0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -246,9 +246,13 @@ public class NASBackupProvider extends AdapterBase implements BackupProvider, Co
if (Objects.isNull(storagePool)) {
throw new CloudRuntimeException("Unable to find storage pool associated to the volume");
}
String volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
String volumePathPrefix;
if (ScopeType.HOST.equals(storagePool.getScope())) {
volumePathPrefix = storagePool.getPath();
} else if (Storage.StoragePoolType.SharedMountPoint.equals(storagePool.getPoolType())) {
volumePathPrefix = storagePool.getPath();
} else {
volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
}
volumePaths.add(String.format("%s/%s", volumePathPrefix, volume.getPath()));
}