Skip to content

Commit f4d6e31

Browse files
Madhu-1humblec
authored andcommitted
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 <[email protected]> (cherry picked from commit 22a86c5)
1 parent 3005fde commit f4d6e31

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/rbd/nodeserver.go

+3
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ func (ns *NodeServer) mountVolumeToStagePath(ctx context.Context, req *csi.NodeS
406406
}
407407

408408
opt := []string{"_netdev"}
409+
if fsType == "xfs" {
410+
opt = append(opt, "nouuid")
411+
}
409412
opt = csicommon.ConstructMountOptions(opt, req.GetVolumeCapability())
410413
isBlock := req.GetVolumeCapability().GetBlock() != nil
411414

0 commit comments

Comments
 (0)