@@ -11,6 +11,8 @@ import (
1111
1212	csi "github.com/container-storage-interface/spec/lib/go/csi" 
1313	fsnotify "github.com/fsnotify/fsnotify" 
14+ 	"google.golang.org/grpc/codes" 
15+ 	"google.golang.org/grpc/status" 
1416	v1 "k8s.io/api/core/v1" 
1517	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 
1618	"k8s.io/apimachinery/pkg/util/wait" 
@@ -165,7 +167,7 @@ func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId str
165167	}
166168	err , isCached  :=  isCachingSetup (mainLvName )
167169	if  err  !=  nil  {
168- 		klog .Errorf ("faild  to check if caching ius  setup for LV, continuing to setup caching." )
170+ 		klog .Errorf ("failed  to check if caching is  setup for LV, continuing to setup caching." )
169171	}
170172	cacheLvName  :=  getLvName (cacheSuffix , volumeId )
171173	if  isCached  {
@@ -194,6 +196,9 @@ func setupCaching(devicePath string, req *csi.NodeStageVolumeRequest, nodeId str
194196			}
195197			info , err  =  common .RunCommand (""  /* pipedCmd */ , nil  /* pipedCmdArg */ , "lvcreate" , args ... )
196198			if  err  !=  nil  {
199+ 				if  strings .Contains (err .Error (), "insufficient free space" ) {
200+ 					return  mainDevicePath , status .Error (codes .InvalidArgument , fmt .Sprintf ("Error setting up cache: %v" , err .Error ()))
201+ 				}
197202				return  mainDevicePath , fmt .Errorf ("Errored while creating cache %w: %s" , err , info )
198203			}
199204		}
@@ -391,6 +396,7 @@ func checkVgExists(volumeGroupName string) bool {
391396		return  false 
392397	}
393398	// Check if the required volume group already exists 
399+ 	klog .Infof ("check vg exists output: %v, volumeGroupName: %v" , string (info ), volumeGroupName )
394400	return  strings .Contains (string (info ), volumeGroupName )
395401}
396402
0 commit comments