Merge pull request #1306 from prometheus/beorn7/storage

Tolerate the lost+found directory in the data directory
This commit is contained in:
Fabian Reinartz 2016-01-12 12:17:38 +01:00
commit 7a012ea611

View File

@ -162,7 +162,7 @@ func newPersistence(
if err != nil {
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)
}
// Finally we can write our own version into a new version file.