diff --git a/internal/collector/logical_disk/logical_disk.go b/internal/collector/logical_disk/logical_disk.go index e9e8f3e4..3d6a59a7 100644 --- a/internal/collector/logical_disk/logical_disk.go +++ b/internal/collector/logical_disk/logical_disk.go @@ -701,6 +701,11 @@ func getAllMountedVolumes() (map[string]string, error) { break } + if errors.Is(err, windows.ERROR_FILE_NOT_FOUND) { + // the volume is not mounted + break + } + if errors.Is(err, windows.ERROR_NO_MORE_FILES) { rootPathBuf = make([]uint16, (rootPathLen+1)/2)