CSI driver for Azure Blob Storage mountpoint on AKS pod does not have enough space as expected

Anonymous
2024-11-27T06:51:28.69+00:00

I follow this Azure documentation to install CSI driver for Azure Blob Storage on our AKS cluster. After the installation, I deploy a sample Nginx pod associated with a PVC with the following manifest:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: statefulset-blob
  labels:
    app: nginx
spec:
  serviceName: statefulset-blob
  replicas: 1
  template:
    metadata:
      labels:
        app: nginx
    spec:
      nodeSelector:
        "kubernetes.io/os": linux
      containers:
        - name: statefulset-blob
          image: nginx:latest
          volumeMounts:
            - name: persistent-storage
              mountPath: /mnt/blob
  updateStrategy:
    type: RollingUpdate
  selector:
    matchLabels:
      app: nginx
  volumeClaimTemplates:
    - metadata:
        name: persistent-storage
      spec:
        storageClassName: azureblob-fuse-premium
        accessModes: ["ReadWriteMany"]
        resources:
          requests:
            storage: 100Gi

I used the default value for the azureblob-fuse-premium StorageClass:

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  labels:
    addonmanager.kubernetes.io/mode: EnsureExists
    kubernetes.io/cluster-service: "true"
  name: azureblob-fuse-premium
mountOptions:
- -o allow_other
- --file-cache-timeout-in-seconds=120
- --use-attr-cache=true
- --cancel-list-on-mount-seconds=10
- -o attr_timeout=120
- -o entry_timeout=120
- -o negative_timeout=120
- --log-level=LOG_WARNING
- --cache-size-mb=1000
parameters:
  skuName: Premium_LRS
provisioner: blob.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

The mountpoint in the Nginx pod only has 1000MB, whereas the request is 100GiB:

Screenshot_20241127_133136Screenshot_20241127_133306 Does anyone encounter this behaviour?

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,201 questions
Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,458 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Abiola Akinbade 29,490 Reputation points Volunteer Moderator
    2024-11-27T07:59:46.5833333+00:00

    Hello Thai Nguyen Minh

    The 1000MB cache size seen in the pod is a default configuration and not the Azure Blob Storage container’s capacity.

    Update the --cache-size-mb parameter in your StorageClass to a higher value. Reapply the StorageClass and redeploy your StatefulSet.

    mountOptions:

    - --cache-size-mb=10240 # 10GB cache size

    If your app is writing directly to Azure Blob Storage, the local cache size should not impact the storage functionality unless the app heavily relies on caching.

    See: https://learn.microsoft.com/en-us/azure/aks/azure-blob-csi?source=recommendations&tabs=NFS

    You can mark it 'Accept Answer' and 'Upvote' if this helped you

    Regards,

    Abiola

    0 comments No comments

  2. Keshavulu Dasari 4,840 Reputation points Microsoft External Staff Moderator
    2024-11-29T03:12:03.6233333+00:00

    Hi Thai Nguyen Minh ,
    Welcome to Microsoft Q&A Forum, thank you for posting your query here!,
    I think this could be due to the way the storage is being interpreted or displayed by the system. Azure Blob storage is designed for unstructured data and may not directly reflect the same capacity metrics as traditional block storage. The representation of storage size can vary based on the protocol used (such as Blob Fuse or NFS) and how the underlying storage is configured.

    If you're using the NFS protocol, the size may be reported differently, and the mount point might not reflect the expected capacity due to the abstraction layer that Blob storage introduces. It’s also possible that the storage class or configuration settings may influence how the size is reported.

    The actual storage capacity is 100GiB, but the representation might vary based on the protocol used (such as BlobFuse or NFS) and the configuration settings. This discrepancy does not mean that the storage is limited to 1000M; it is just a display issue.

    References:

    Container Storage Interface (CSI) drivers on Azure Kubernetes Service (AKS)


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.