I was working with a client to configure their Azure Service Fabric cluster environment. For their sandbox environment, they wanted to use basic virtual machines to keep the monthly bill reasonable. We decided to use standard DS1 v2 machines for their nodes. After creating the service fabric environment and configuring it, they wanted to deploy the code to the nodes. But they encountered the disk space problem and it prevents them to deploy the code from VSTS to the Azure Service Fabric cluster.
To investigate the issue, I logged in to the VMs in the Service Fabric cluster and found out that the code is being deployed to the D drive and the D drive has a limited space.
As you know, D drive is marked as the temp drive and it is possible that when you restart the machine, the D drive wipes out and end up with the broken application. So, the smart move is to change the deployment path of the Service Fabric deployment job and store the code in a drive other than the temp drive (drive C is not a good candidate since it is the OS disk, my suggestion is to attach a second data disk to the Service fabric cluster machines and use it as a deployment path). I investigated on this issue and I could not find any configuration value in the deployment job for the Service Fabric cluster to specify the deployment path.
How to change the deployment path for the Service Fabric code in the deployment job of the VSTS.
It seems as of today, it is not possible to change the deployment path of the service fabric cluster solution. This value is set when you want to create your Service Fabric scale set as the “data path”. The Service Fabric is by design installed on the D drive as will all the applications deployed to the cluster. It makes sense that it does not installed on the C drive since it is reserved for the OS, but the fact that this path is not configurable is annoying. When I contacted Microsoft engineers about this, they told me :
“We would NOT recommend changing this configuration due to the performance issues that would occur and will NOT support performance related issues that occur if this configuration is used.”
So changing the data path on an existing Service Fabric cluster is not supported as of today. But it is possible to set the value in the ARM template when you want to create a new Service Fabric Cluster, in the virtualMachineProfile set the “dataPath” property set to some other location.
So, in order to not facing any problem down the road, you have to think about your data path value configuration before the deployment of the Service Fabric cluster, when you want to plan for your Service Fabric deployment.