mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 16:50:23 +00:00
rbd: default nouuid if the formattype is xfs
The problem happens when multiple PVCs with the
same UUID are attached/mounted on a node. This
can happen after creating a PVC from a snapshot,
or cloning a PVC.
make nouuid as the default mount option if
the format type is xfs to avoid mounting
issues.
updates: #966
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 22a86c568e
)
This commit is contained in:
parent
3005fde6f7
commit
f4d6e31764
@ -406,6 +406,9 @@ func (ns *NodeServer) mountVolumeToStagePath(ctx context.Context, req *csi.NodeS
|
|||||||
}
|
}
|
||||||
|
|
||||||
opt := []string{"_netdev"}
|
opt := []string{"_netdev"}
|
||||||
|
if fsType == "xfs" {
|
||||||
|
opt = append(opt, "nouuid")
|
||||||
|
}
|
||||||
opt = csicommon.ConstructMountOptions(opt, req.GetVolumeCapability())
|
opt = csicommon.ConstructMountOptions(opt, req.GetVolumeCapability())
|
||||||
isBlock := req.GetVolumeCapability().GetBlock() != nil
|
isBlock := req.GetVolumeCapability().GetBlock() != nil
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user