訪問模式
PV可以使用存儲資源提供商支持的任何方法來映射到host中。如下的表格中所示,提供商有着不同的功能,每個PV的訪問模式被設置為卷支持的指定模式。比如,NFS可以支持多個讀/寫的客戶端,但可以在服務器上指定一個只讀的NFS PV。每個PV有它自己的訪問模式。
訪問模式包括:
▷ ReadWriteOnce —— 該volume只能被單個節點以讀寫的方式映射
▷ ReadOnlyMany —— 該volume可以被多個節點以只讀方式映射
▷ ReadWriteMany —— 該volume只能被多個節點以讀寫的方式映射
在CLI中,訪問模式可以簡寫為:
▷ RWO - ReadWriteOnce
▷ ROX - ReadOnlyMany
▷ RWX - ReadWriteMany
注意:即使volume支持很多種訪問模式,但它同時只能使用一種方式來映射。比如,GCEPersistentDisk可以被單個節點映射為ReadWriteOnce,或者多個節點映射為ReadOnlyMany,但不能同時使用這兩種方式來映射。
| Volume Plugin | ReadWriteOnce | ReadOnlyMany | ReadWriteMany |
|---|---|---|---|
| AWSElasticBlockStore | ✓ | - | - |
| AzureFile | ✓ | ✓ | ✓ |
| AzureDisk | ✓ | - | - |
| CephFS | ✓ | ✓ | ✓ |
| Cinder | ✓ | - | - |
| FC | ✓ | ✓ | - |
| FlexVolume | ✓ | ✓ | - |
| Flocker | ✓ | - | - |
| GCEPersistentDisk | ✓ | ✓ | - |
| Glusterfs | ✓ | ✓ | ✓ |
| HostPath | ✓ | - | - |
| iSCSI | ✓ | ✓ | - |
| PhotonPersistentDisk | ✓ | - | - |
| Quobyte | ✓ | ✓ | ✓ |
| NFS | ✓ | ✓ | ✓ |
| RBD | ✓ | ✓ | - |
| VsphereVolume | ✓ | - | - |
| PortworxVolume | ✓ | - | ✓ |
| ScaleIO | ✓ | ✓ | - |
