diff --git a/lib/mergeset/table.go b/lib/mergeset/table.go index 6945024672..cb875c0269 100644 --- a/lib/mergeset/table.go +++ b/lib/mergeset/table.go @@ -316,7 +316,8 @@ func OpenTable(path string, flushCallback func(), prepareBlock PrepareBlockCallb // Protect from concurrent opens. flockF, err := fs.CreateFlockFile(path) if err != nil { - return nil, err + return nil, fmt.Errorf("cannot create lock file in %q; "+ + "make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err) } // Open table parts. diff --git a/lib/storage/storage.go b/lib/storage/storage.go index 5503708430..702628d2ad 100644 --- a/lib/storage/storage.go +++ b/lib/storage/storage.go @@ -187,7 +187,8 @@ func OpenStorage(path string, retentionMsecs int64, maxHourlySeries, maxDailySer // Protect from concurrent opens. flockF, err := fs.CreateFlockFile(path) if err != nil { - return nil, err + return nil, fmt.Errorf("cannot create lock file in %q; "+ + "make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err) } s.flockF = flockF diff --git a/lib/storage/table.go b/lib/storage/table.go index 5eca5e4a3a..690d21715f 100644 --- a/lib/storage/table.go +++ b/lib/storage/table.go @@ -90,7 +90,8 @@ func openTable(path string, s *Storage) (*table, error) { // Protect from concurrent opens. flockF, err := fs.CreateFlockFile(path) if err != nil { - return nil, err + return nil, fmt.Errorf("cannot create lock file in %q; "+ + "make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err) } // Create directories for small and big partitions if they don't exist yet.