# V58 db migrate fail - piece\_expiration.db - 1.108.3

**URL:** <https://forum.storj.io/t/v58-db-migrate-fail-piece-expiration-db-1-108-3/27238>\
**Category:** troubleshooting\
**Tags:** database\
**Created:** [July 23, 2024, 6:13am UTC](https://forum.storj.io/t/v58-db-migrate-fail-piece-expiration-db-1-108-3/27238 "2024-07-23T06:13:30Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![nerdatwork](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/nerdatwork/32/1135_2.png) [@nerdatwork](https://forum.storj.io/u/nerdatwork)\
**Post date:** [July 26, 2024, 12:30pm UTC](https://forum.storj.io/t/v58-db-migrate-fail-piece-expiration-db-1-108-3/27238/20 "2024-07-26T12:30:51Z")

</div>

> [@Ruskiem](#):
>
> so the only db with not “ok” with PRAGMA check was “piece\_expiration.db”

> [@Release preparation v1.108](https://forum.storj.io/t/release-preparation-v1-108/27006/74):
>
> I can confirm that the new version did crash my Windows node but went flawlessly on Linux node. 2024-07-25T04:35:07Z ERROR failure during run {"Process": "storagenode", "error": "Error migrating tables for database on storagenode: migrate: database: piece\_expiration opening file \"dbs/piece\_expiration.db\" failed: unable to open database file: no such file or directory\n\tstorj.io/storj/storagenode/storagenodedb.(\*DB).openDatabase:402\n\tstorj.io/storj/storagenode/storagenodedb.(\*DB).Migration…

I got stuck at v59 migration. I edited the db by looking at the code for db changes for v59. I then started the node and the migration went successfully. Now I am stuck with collector warnings about `file not found`.

```auto
2024-07-26T12:26:03Z WARN collector unable to delete piece { "Satellite ID": 1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE "Piece ID": "DXVIUNDADUW3FNLT6YPUCGUU25CZXQRNDWNAGUOCBKVXAWHFK45Q", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storagenode/blobstore/filestore.(*blobStore).Stat:122\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:290\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).DeleteWithStorageFormat:270\n\tstorj.io/storj/storagenode/pieces.(*Store).DeleteSkipV0:356\n\tstorj.io/storj/storagenode/collector.(*Service).Collect.func1:88\n\tstorj.io/storj/storagenode/storagenodedb.(*pieceExpirationDB).GetExpired:71\n\tstorj.io/storj/storagenode/pieces.(*Store).GetExpired:576\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:87\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:65\n\tstorj.io/common/sync2.(*Cycle).Run:99\n\tstorj.io/storj/storagenode/collector.(*Service).Run:61\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:87\n\truntime/pprof.Do:51\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:78"}
2024-07-26T12:26:03Z WARN collector unable to delete piece { "Satellite ID": 1wFTAgs9DP5RSnCqKV1eLf6N9wtk4EAtmN5DpSxcs8EjT69tGE "Piece ID": "ZN7SDB2D2DFTQNFEMEPWWGBNV2JG7RSM2WC2LZYRXXOIGRZHDUWA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storagenode/blobstore/filestore.(*blobStore).Stat:122\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:290\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).DeleteWithStorageFormat:270\n\tstorj.io/storj/storagenode/pieces.(*Store).DeleteSkipV0:356\n\tstorj.io/storj/storagenode/collector.(*Service).Collect.func1:88\n\tstorj.io/storj/storagenode/storagenodedb.(*pieceExpirationDB).GetExpired:71\n\tstorj.io/storj/storagenode/pieces.(*Store).GetExpired:576\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:87\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:65\n\tstorj.io/common/sync2.(*Cycle).Run:99\n\tstorj.io/storj/storagenode/collector.(*Service).Run:61\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:87\n\truntime/pprof.Do:51\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:78"}

```

I checked the log and I can see piece ids repeating for the `file not found` entries. The log is at `info` level and increasing at the rate of 150 MB per hour.

As a last resort, I am thinking of replacing `piece_expiration.db` with a blank one and bear with TTL data for a while.

---

_[View the full topic](https://forum.storj.io/t/v58-db-migrate-fail-piece-expiration-db-1-108-3/27238)._
