# Node database corruption - Help requested

**URL:** <https://forum.storj.io/t/node-database-corruption-help-requested/26979>\
**Category:** troubleshooting\
**Tags:** database\
**Created:** [July 6, 2024, 11:58am UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979 "2024-07-06T11:58:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpare](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cpare/32/7701_2.png) [@cpare](https://forum.storj.io/u/cpare)\
**Post date:** [July 6, 2024, 11:58am UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979/1 "2024-07-06T11:58:45Z")

</div>

Hoping to get some guidance on a database corruption event - looking at the forums I only see posts around 2020 - nothing recent.

- How can I tell which database was corrupted?
- Do we have new steps to resolve corruption other than drop table and recreate?

```auto
2024-07-06T11:43:26Z INFO db.migration.58 Remove unused trash column {"Process": "storagenode"}
2024-07-06T11:43:26Z ERROR failure during run {"Process": "storagenode", "error": "Error migrating tables for database on storagenode: migrate: v58: database disk image is malformed\n\tstorj.io/storj/private/migrate.(*Migration).Run:212\n\tstorj.io/storj/storageprocess.cleanup.func1.4:393\n\tstorj.io/common/process.cleanup.func1:411\n\tgithub.com/spf13/cobra.(*Command).execute:983\n\tgithub.com/spf13/cobra.(*Command).ExecuteC:1115\n\tgithub.com/spf13/cobra.(*Command).Execute:1039\n\tstorj.io/common/process.ExecWithCustomOptions:: migrate: v58: database disk image is malformed\n\tstorj.io/storj/private/migrate.(*Migration).Run:212\n\tstorj.io/storj/storagenode/storagenodedb.(*DB).MigrateToLatest:387\n\tmain.cmdRun:98\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.cleanup.func1.4:393\n\tstoobra.(*Command).ExecuteC:1115\n\tgithub.com/spf13/cobra.(*Command).Execute:1039\n\tstorj.io/common/process.ExecWithCustomOptions:112\n\tmain.main:34\n\truntime.main:271\n\tmain.cmdRun:100\n\tmain.newRunCmd.func1:33\n\tstorj.io/common/process.cleanup.func1.4:393\n\tstorj.i.(*Command).ExecuteC:1115\n\tgithub.com/spf13/cobra.(*Command).Execute:1039\n\tstorj.io/common/process.ExecWithCustomOptions:112\n\tmain.main:34\n\truntime.main:271"}
Error: Error migrating tables for database on storagenode: migrate: v58: database disk image is malformed
        storj.io/storj/private/migrate.(*Migration).Run:212
        storj.io/storj/storagenode/storagenodedb.(*DB).MigrateToLatest:387
        main.cmdRun:98
        main.newRunCmd.func1:33
        storj.io/common/process.cleanup.func1.4:393
        storj.io/common/process.cleanup.func1:411
        github.com/spf13/cobra.(*Command).execute:983
        github.com/spf13/cobra.(*Command).ExecuteC:1115
        github.com/spf13/cobra.(*Command).Execute:1039
        storj.io/common/process.ExecWithCustomOptions:112
        main.main:34
        runtime.main:271
2024-07-06 11:43:26,610 INFO exited: storagenode (exit status 1; not expected)

```

---

<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 6, 2024, 12:34pm UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979/2 "2024-07-06T12:34:37Z")

</div>

> [@cpare](#):
>
> `database disk image is malformed`

> **[How to fix a "database disk image is malformed"](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed)**
>
> Problem
> Sometimes a Storage Node Operator may encounter the "database disk image is malformed" error in their log. This could happen during unplanned shutdown or reboot. The error indicates that on...

---

<div class="post-metadata">

**Author:** ![cpare](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cpare/32/7701_2.png) [@cpare](https://forum.storj.io/u/cpare)\
**Post date:** [July 6, 2024, 6:46pm UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979/3 "2024-07-06T18:46:42Z")

</div>

This allowed me to identify and resolve the problem. If the document maintainer could reach out there were a few items that could be improved / corrected

---

<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 6, 2024, 6:57pm UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979/4 "2024-07-06T18:57:32Z")

</div>

> [@cpare](#):
>
> a few items that could be improved / corrected

You could mention the improvements in a reply in this thread.

---

<div class="post-metadata">

**Author:** ![Alexey](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/alexey/32/41_2.png) [@Alexey](https://forum.storj.io/u/Alexey)\
**Post date:** [July 7, 2024, 6:46am UTC](https://forum.storj.io/t/node-database-corruption-help-requested/26979/5 "2024-07-07T06:46:39Z")

</div>

Or even suggest a pull request to the [GitHub - storj/docs: Source for Storj docs](https://github.com/storj/docs) repo.  
We would be happy to review and merge (and I would mention this new link in the Support Portal KB instead of the current article).
