Tolerate the lost+found directory in the data directory
This commit is contained in:
parent
6293f3a374
commit
add2ebdd56
|
@ -162,7 +162,7 @@ func newPersistence(
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(fis) > 0 {
|
if len(fis) > 0 && !(len(fis) == 1 && fis[0].Name() == "lost+found" && fis[0].IsDir()) {
|
||||||
return nil, fmt.Errorf("could not detect storage version on disk, assuming version 0, need version %d - please wipe storage or run a version of Prometheus compatible with storage version 0", Version)
|
return nil, fmt.Errorf("could not detect storage version on disk, assuming version 0, need version %d - please wipe storage or run a version of Prometheus compatible with storage version 0", Version)
|
||||||
}
|
}
|
||||||
// Finally we can write our own version into a new version file.
|
// Finally we can write our own version into a new version file.
|
||||||
|
|
Loading…
Reference in New Issue