From f4d6e31764de54c7de0f16d56e1280b4d8a324ac Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 4 May 2020 15:31:59 +0530 Subject: [PATCH] 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 (cherry picked from commit 22a86c568e33495aab58339ab4fd3de2b4ab5ab1) --- pkg/rbd/nodeserver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/rbd/nodeserver.go b/pkg/rbd/nodeserver.go index 8359a93a4..fde41a180 100644 --- a/pkg/rbd/nodeserver.go +++ b/pkg/rbd/nodeserver.go @@ -406,6 +406,9 @@ func (ns *NodeServer) mountVolumeToStagePath(ctx context.Context, req *csi.NodeS } opt := []string{"_netdev"} + if fsType == "xfs" { + opt = append(opt, "nouuid") + } opt = csicommon.ConstructMountOptions(opt, req.GetVolumeCapability()) isBlock := req.GetVolumeCapability().GetBlock() != nil