mirror of
https://github.com/kubernetes-csi/csi-driver-nvmf.git
synced 2025-08-31 04:40:47 +00:00
fix: make ro and rw mounts for one same nqn possible in a single node
ReadOnly and ReadWrite mounts for one same nqn in a single node return -EBUSY error. So, we should remove readonly and readwrite options when mounting a block device in a csi driver. A cri runtime makes a mount as readonly inside containers if needed.
This commit is contained in:
@@ -142,11 +142,6 @@ func AttachDisk(req *csi.NodePublishVolumeRequest, nm nvmfDiskMounter) (string,
|
||||
|
||||
// Tips: use k8s mounter to mount fs and only support "ext4"
|
||||
var options []string
|
||||
if nm.readOnly {
|
||||
options = append(options, "ro")
|
||||
} else {
|
||||
options = append(options, "rw")
|
||||
}
|
||||
options = append(options, nm.mountOptions...)
|
||||
err = nm.mounter.FormatAndMount(devicePath, mntPath, nm.fsType, options)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user