AKS icon indicating copy to clipboard operation
AKS copied to clipboard

[BUG] Azure Container Storage - ZRS volume creation is not working properly.

Open frank-m opened this issue 1 year ago • 3 comments

Describe the bug

If this documentation is followed: https://learn.microsoft.com/en-us/azure/storage/container-storage/enable-multi-zone-redundancy#use-zone-redundant-storage-zrs-disks

Instead of creating a single zrs volume, it will create three zrs volumes divided over the three zones.

To Reproduce

  • Install Container Storage on a zone-redundant node pool
  • Create a Storagepool like this:
apiVersion: containerstorage.azure.com/v1
kind: StoragePool
metadata:
  name: azuredisk
  namespace: acstor
spec:
  poolType:
    azureDisk:
      skuName: Premium_ZRS
  resources:
    requests:
      storage: 100Gi
  • Now three ZRS volumes of 33Gi are created, each in one zone.

Image

  • If you describe the object, you see that it has zones configured:
Spec:
  Pool Type:
    Azure Disk:
      Sku Name:    Premium_ZRS
  Reclaim Policy:  Delete
  Resources:
    Requests:
      Storage:  100Gi
  Zones:
    1
    2
    3

Expected behavior A single ZRS volume gets created of 100Gi. This is also what the documentation describes. Instead it seems it creates a volume in each zone to let the application handle redundancy.

But what happens is three zrs volumes get created. One in each zone.

Screenshots If applicable, add screenshots to help explain your problem. Make sure not to include sensitive or personal information.

Environment (please complete the following information):

  • CLI Version [e.g. 3.22]:
❯ az version
{
  "azure-cli": "2.70.0",
  "azure-cli-core": "2.70.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {
    "k8s-configuration": "2.2.0"
  }
}
  • Kubernetes version: 1.31.5

Additional context I can of course add a single zone, but what happens when a zone fails in that case?

frank-m avatar Apr 28 '25 09:04 frank-m

Update to the above. If you try to create the volume with zones specified as an empty list:

apiVersion: containerstorage.azure.com/v1
kind: StoragePool
metadata:
  name: azuredisk
  namespace: acstor
spec:
  zones: [""]
  poolType:
    azureDisk:
      skuName: Premium_ZRS
  resources:
    requests:
      storage: 1Ti

You get the following error:

The StoragePool "azuredisk" is invalid: Zones: Invalid value: []string{""}: Cannot specify no zones on zoned nodepools

frank-m avatar Apr 29 '25 09:04 frank-m

Hi @frank-m

The behavior you're observing is expected and by design. For zonal clusters, we require the use of zonal storage pools (SPs), and users can choose between LRS (Locally Redundant Storage) and ZRS (Zone-Redundant Storage) for the underlying disks.

Here are a few key points to clarify:

  • Disk Capacity: The total capacity of the storage pool is divided across the number of zones. For example, if you provision a 300Gi pool across 3 zones, each zone will have 100Gi available. Storage in each zone is served only from that zone.
  • LRS Disks: One LRS disk is created per zone. This is a good option when you are managing your own replication. However, if all nodes in a zone become unhealthy or the zone experiences an outage, the disk in that zone becomes unavailable, and any volumes using that disk will also be unavailable.
  • ZRS Disks: One ZRS disk is created per zone. These disks are zone-redundant, meaning the data is replicated across zones at the platform level. This allows the Persistent Volume (PV) and disk to be manually moved to another zone in the event of a zone failure. However, automatic failover is not supported—manual intervention is required to recover.

Additionally, it's important to note that Azure Container Storage does not replicate data for ZRS disks. Since replication is handled by the platform, you cannot expect to write data to a disk in zone 1 and read it from zone 2. The data is recoverable across zones during an outage, but not simultaneously accessible across zones.

If you have more questions, please feel free to reach out to us at: [email protected]

saurabh0501 avatar May 15 '25 01:05 saurabh0501

Thanks for reaching out. I'm closing this issue as it was marked with "Answer Provided" and it hasn't had activity for 2 days.