diff --git a/internal/rbd/nodeserver.go b/internal/rbd/nodeserver.go index 96d7989a5..e1df954b7 100644 --- a/internal/rbd/nodeserver.go +++ b/internal/rbd/nodeserver.go @@ -1268,6 +1268,17 @@ func (ns *NodeServer) NodeGetVolumeStats( stat, err := os.Stat(targetPath) if err != nil { + if util.IsCorruptedMountError(err) { + log.WarningLog(ctx, "corrupted mount detected in %q: %v", targetPath, err) + + return &csi.NodeGetVolumeStatsResponse{ + VolumeCondition: &csi.VolumeCondition{ + Abnormal: true, + Message: err.Error(), + }, + }, nil + } + return nil, status.Errorf(codes.InvalidArgument, "failed to get stat for targetpath %q: %v", targetPath, err) }