diff --git a/pkg/deviceutils/device-utils_linux.go b/pkg/deviceutils/device-utils_linux.go index 3e1cda5c4..752f08c4c 100644 --- a/pkg/deviceutils/device-utils_linux.go +++ b/pkg/deviceutils/device-utils_linux.go @@ -20,9 +20,13 @@ import ( "fmt" "os" "path/filepath" + + "k8s.io/klog/v2" ) func (_ *deviceUtils) DisableDevice(devicePath string) error { deviceName := filepath.Base(devicePath) - return os.WriteFile(fmt.Sprintf("/sys/block/%s/device/state", deviceName), []byte("offline"), 0644) + f := fmt.Sprintf("/sys/block/%s/device/state", deviceName) + klog.Infof("DisableDevice called with device path %s device name %s, target filepath %s", devicePath, deviceName, f) + return os.WriteFile(f, []byte("offline"), 0644) }