Martin Brandl
Martin Brandl

Reputation: 58931

How to increase disk storage in Azure Cloud Service classic

In a old project, we still use Cloud Services (classic) where I want to increase the size of the Local Disk F. Right now the disk is 2 GB in size and I don't find any way to increase it.

I have not found a corresponding setting in the ServiceDefinition.csdef file or the ServiceConfig.cscfg file.

Is this even possible? enter image description here

{

Upvotes: 2

Views: 456

Answers (1)

kwill
kwill

Reputation: 10998

edit: I realized you were talking about the approot drive (E/F drive) and not the temp disk

The approot drive (E/F drive) is fixed and cannot be modified. For more information and limitations on this drive see https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-configuration-and-management-faq#why-does-the-drive-on-my-cloud-service-vm-show-very-little-free-disk-space-.

The %approot% drive size is calculated as <size of .cspkg + max journal size + a margin of free space>, or 1.5 GB, whichever is larger. The size of your VM has no bearing on this calculation. (The VM size only affects the size of the temporary C: drive.) 

It is unsupported to write to the %approot% drive. If you are writing to the Azure VM, you must do so in a temporary LocalStorage resource (or other option, such as Blob storage, Azure Files, etc.). So the amount of free space on the %approot% folder is not meaningful. If you are not sure if your application is writing to the %approot% drive, you can always let your service run for a few days and then compare the "before" and "after" sizes. 

Azure will not write anything to the %approot% drive. Once the VHD is created from your .cspkg and mounted into the Azure VM, the only thing that might write to this drive is your application.

original answer regarding temp disk size:

The local disk size in a Cloud Service VM is controlled by the VM size, which you define in your .csdef file:

<WorkerRole name="Worker1" vmsize="Standard_D2">
...
</WorkerRole>

For the different size options, see https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-sizes-specs

Upvotes: 1

Related Questions