Skip to content

Commit c0450e7

Browse files
abh1sarjschoiRR
authored andcommitted
Handle nas backup and restore on Shared mount point. (apache#11204)
1 parent 7cfd1a1 commit c0450e7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

plugins/backup/nas/src/main/java/org/apache/cloudstack/backup/NASBackupProvider.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,13 @@ private List<String> getVolumePaths(List<VolumeVO> volumes) {
250250
if (Objects.isNull(storagePool)) {
251251
throw new CloudRuntimeException("Unable to find storage pool associated to the volume");
252252
}
253-
String volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
253+
String volumePathPrefix;
254254
if (ScopeType.HOST.equals(storagePool.getScope())) {
255255
volumePathPrefix = storagePool.getPath();
256+
} else if (Storage.StoragePoolType.SharedMountPoint.equals(storagePool.getPoolType())) {
257+
volumePathPrefix = storagePool.getPath();
258+
} else {
259+
volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
256260
}
257261
volumePaths.add(String.format("%s/%s", volumePathPrefix, volume.getPath()));
258262
}

0 commit comments

Comments
 (0)