Skip to content

Commit 3038525

Browse files
abh1sardhslove
authored andcommitted
Handle nas backup and restore on Shared mount point. (apache#11204)
1 parent 3628e59 commit 3038525

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
@@ -257,9 +257,13 @@ private List<String> getVolumePaths(List<VolumeVO> volumes) {
257257
if (Objects.isNull(storagePool)) {
258258
throw new CloudRuntimeException("Unable to find storage pool associated to the volume");
259259
}
260-
String volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
260+
String volumePathPrefix;
261261
if (ScopeType.HOST.equals(storagePool.getScope())) {
262262
volumePathPrefix = storagePool.getPath();
263+
} else if (Storage.StoragePoolType.SharedMountPoint.equals(storagePool.getPoolType())) {
264+
volumePathPrefix = storagePool.getPath();
265+
} else {
266+
volumePathPrefix = String.format("/mnt/%s", storagePool.getUuid());
263267
}
264268
volumePaths.add(String.format("%s/%s", volumePathPrefix, volume.getPath()));
265269
}

0 commit comments

Comments
 (0)