如何增加 Azure 云服务经典版中的磁盘存储

How to increase disk storage in Azure Cloud Service classic

在一个旧项目中,我们仍然使用云服务(经典),我想增加 本地磁盘 F 的大小。现在磁盘大小为 2 GB,我找不到任何增加它的方法。

我没有在ServiceDefinition.csdef文件或ServiceConfig.cscfg文件中找到相应的设置。

这可能吗?

编辑:我意识到你在谈论 approot 驱动器(E/F 驱动器)而不是临时磁盘

approot 驱动器(E/F 驱动器)已修复,无法修改。有关此驱动器的更多信息和限制,请参阅 https://docs.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.

关于临时磁盘大小的原始答案:

云服务 VM 中的本地磁盘大小由您在 .csdef 文件中定义的 VM 大小控制:

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

有关不同尺寸的选项,请参阅 https://docs.microsoft.com/en-us/azure/cloud-services/cloud-services-sizes-specs