file-permissionsbucketminioobject-storage

Stored objects/files of Minio do not appear in local disk


I have created a folder in root direcoty, i.e. /data/test and I have already given full permissions to this folder using:

chmod 775 /data/test

Than I started MinIO, and from Minio GUI console, I created a bucket called mybucket and placed a txt file inside this bucket.

Note the mount path I passed to start MinIO server is /data/test.

I assume that the normal behavior is the txt file to appear in /data/test. However, the local folder is empty: ls /data/test/ returns nothing.

Where the txt file is actually reside on my local machine?


Solution

  • The problem was that I used a StatefulSet with volumeClaimTemplates which is deprecated.

    Instead, I used a PV and a PVC and the problem is solved.

    PV and PVC

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      namespace: ches
      name: ches-pv
    spec:
      capacity:
        storage: 1Gi
      accessModes:
      - ReadWriteOnce
      persistentVolumeReclaimPolicy: Delete
      storageClassName: edge-pv-class
      local:
        path: /data/test
      nodeAffinity:
        required:
          nodeSelectorTerms:
          - matchExpressions:
            - key: ches-worker
              operator: In
              values:
              - "true"
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: edge-claim
      namespace: ches
    spec:
      accessModes:
      - ReadWriteOnce
      storageClassName: edge-pv-class
      resources:
        requests:
          storage: 1Gi
    ---
    

    StatefulSet

    volumeMounts:
    - name: data
      mountPath: /data