Skip to content

Commit 0ebf72d

Browse files
authored
Handle nas backup and restore on Shared mount point. (#11204)
1 parent d72a05a commit 0ebf72d

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
@@ -246,9 +246,13 @@ private List<String> getVolumePaths(List<VolumeVO> volumes) {
246246
if (Objects.isNull(storagePool)) {
247247
throw new CloudRuntimeException("Unable to find storage pool associated to the volume");
248248
}
249-
String volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
249+
String volumePathPrefix;
250250
if (ScopeType.HOST.equals(storagePool.getScope())) {
251251
volumePathPrefix = storagePool.getPath();
252+
} else if (Storage.StoragePoolType.SharedMountPoint.equals(storagePool.getPoolType())) {
253+
volumePathPrefix = storagePool.getPath();
254+
} else {
255+
volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
252256
}
253257
volumePaths.add(String.format("%s/%s", volumePathPrefix, volume.getPath()));
254258
}

0 commit comments

Comments
 (0)