4.6.4. Consuming storage using FlexVolume drivers


You can consume a Fibre Channel volume by using a PersistentVolume object.

Each PersistentVolume object in OpenShift Container Platform represents one storage asset in the storage back-end, such as a volume.

Procedure

  • Use the PersistentVolume object to reference the installed storage.

    Persistent volume object definition using FlexVolume drivers example

    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: pv0001
    spec:
      capacity:
        storage: 1Gi
      accessModes:
        - ReadWriteOnce
      flexVolume:
        driver: openshift.com/foo
        fsType: "ext4"
        secretRef: foo-secret
        readOnly: true
        options:
          fooServer: 192.168.0.1:1234
          fooVolumeName: bar

    where:

    metadata.name
    Specifies the name of the volume. This is how it is identified through persistent volume claims or from pods. This name can be different from the name of the volume on back-end storage.
    spec.capacity.storage
    Specifies the amount of storage allocated to this volume.
    spec.flexVolume.driver
    Specifies the name of the driver. This field is mandatory.
    spec.flexVolume.fsType
    Specifies the file system that is present on the volume. This field is optional.
    spec.flexVolume.secretRef
    Specifies the reference to a secret. Keys and values from this secret are provided to the FlexVolume driver on invocation. This field is optional.
    spec.flexVolume.readOnly
    Specifies the read-only flag. This field is optional.
    spec.flexVolume.options

    Specifies the additional options for the FlexVolume driver. In addition to the flags specified by the user in the options field, the following flags are also passed to the executable:

    "fsType":"<FS type>", "readwrite":"<rw>", "secret/key1":"<secret1>" "secret/keyN":"<secretN>"

    참고

    Secrets are passed only to mount or unmount call-outs.

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동