diff --git a/pkg/cephfs/controllerserver.go b/pkg/cephfs/controllerserver.go index d0e20d9d4..dd1122c22 100644 --- a/pkg/cephfs/controllerserver.go +++ b/pkg/cephfs/controllerserver.go @@ -185,5 +185,11 @@ func (cs *controllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol func (cs *controllerServer) ValidateVolumeCapabilities( ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) { + // Cephfs doesn't support Block volume + for _, cap := range req.VolumeCapabilities { + if cap.GetBlock() != nil { + return &csi.ValidateVolumeCapabilitiesResponse{Supported: false, Message: ""}, nil + } + } return &csi.ValidateVolumeCapabilitiesResponse{Supported: true}, nil }