Longhorn persistent volume not support for multi pod bind



During deployment , using longhorn persistent volume with replica 2. but getting error while trying to mount pvc on pods. will Longhorn persistent volume support for multi pod bind with different worker nodes ?

Could please guide.



Hi @bala

Longhorn is a Read-Write-Once type storage for Kubernetes. It’s the same as AWS EBS and Google Persistent Disk, which can only be mounted on one node. It’s a distributed block storage solution rather than a distributed file system solution, so it cannot be written at the same time for the different nodes.

You can use StatefulSet with VolumeClaimTemplate instead of Deployment. Kubernetes would create a PVC per Pod, so that’s one Longhorn volume per Pod. In this way, you can scale your workload easily with Longhorn.


Thank You much Yasker for explained.

Could please guide me the right persistent volume solution with Read write Many in Rancher Kubernetes


You can take look at NFS.


Any solution to implement block storage as pv ?


Not sure what did you meant implement block storage a PV. Longhorn can be used as PV.

Though no block storage can support Read-Write-Many mode. It’s impossible since changing the storage content without filesystem knowing would result in data corruption.


Thanks Sheng Yang. Got it.