High Availability Shared Storage using Azure File Storage

I am following the following link to set up a High Availability server on an Azure hosted windows 2019 VM using Octopus v2021.3

My share is successfully mounted as a local drive R: (for Repository), T: (TaskLogs), Z: (Artifacts)
Drives are mapped by service account and have full access to the directory.

I created a Symlink to the shared drive
mklink /D “C:\Octo\Repository” “R:\Repository”
mklink /D “C:\Octo\Task_Logs” “T:”
mklink /D “C:\Octo\Artifacts” “Z:”

Changed the path
$octopus = “C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe”
$newNuGetRepository = “C:\Octo\Repository”
$newArtifacts = “C:\Octo\Artifacts”
$newTaskLogs = “C:\Octo\Task_Logs”

& “$octopus” path --nugetRepository="$newNuGetRepository"
& “$octopus” path --artifacts="$newArtifacts"
& “$octopus” path --taskLogs="$newTaskLogs"

I’m getting below errors accessing task logs and repository. Can you please suggest?

System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octo\Task_Logs\scheduledtasks_processrecurringscheduleddeployments.txt’.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileMode mode, FileAccess access, FileShare share)
at Octopus.Server.Orchestration.Logging.Processors.AppendToLogFile.InitializeInternal() in ./source/Octopus.Server/Orchestration/Logging/Processors/AppendToLogFile.cs:line 44
at Octopus.Server.Orchestration.Logging.ServerLogStorage.BuildWriter(RootCorrelationId rootCorrelationId) in ./source/Octopus.Server/Orchestration/Logging/ServerLogStorage.cs:line 190
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)

at Nancy.NancyEngine.InvokeOnErrorHook(NancyContext context, ErrorPipeline pipeline, Exception ex)
2022-02-15 18:35:57.4081 3752 54 ERROR Unhandled error on request: “Could not find a part of the path ‘C:\Octo\Repository\Spaces-82\feeds-builtin\CloudOpsTools_ADDS’.”
System.IO.DirectoryNotFoundException: Could not find a part of the path ‘C:\Octo\Repository\Spaces-82\feeds-builtin\CloudOpsTools_ADDS’.

Hi @sahil.09,

First, welcome to the community!

Thanks for posting your issue, and I’m sorry to hear you’re hitting issues between Octopus and Symlink directories.

I was wondering if these Symlink directories are being created by the same user the Octopus service is running under, or if you’ve granted access to these directories to that service account? Judging by the error, I’m wondering if the Symlink directories were created under another user account, and therefore the Octopus service account isn’t able to see them.

Let me know what you think.


Hi Patrick,

Symlink directories was created by the same (octopus service account) user.
Drives were also mapped by the service account user.
service account also has full access to the drives mapped and the symlink directory


Hi @sahil.09,

Thanks for getting back to me quickly with those details.

I’ve done some testing on my end to see if I can get this working, and from what I’ve found, it looks like creating a Symlink to a mapped network drive (e.g. Z:) isn’t possible. For example, the following StackOverflow post uses UNC paths (e.g. \server\octo\artifacts) to work around this:

Regardless of whether it’s possible or not, I’ve tested using Symlinks with UNC paths on my end and it seems to work, so I was wondering if you’re able to attempt using UNC paths to these directories instead?

Let me know if that’s helpful!


Hey Patrick,

I can’t thank you much. You are a savior.

It worked using the UNC Path.

Highly appreciate your prompt research and response.


Hey Sahil,

I’m glad to hear that fixed it for you, and thanks for letting me know!

If you have any further questions or issues please reach out and we’ll be happy to assist.

Happy deployments!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.