# Database issue?

**URL:** <https://forum.storj.io/t/database-issue/12865>\
**Category:** troubleshooting\
**Tags:** sshfs, database, web-dashboard\
**Created:** [April 7, 2021, 7:04pm UTC](https://forum.storj.io/t/database-issue/12865 "2021-04-07T19:04:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![kosti11](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kosti11/32/1134_2.png) [@kosti11](https://forum.storj.io/u/kosti11)\
**Post date:** [April 7, 2021, 7:04pm UTC](https://forum.storj.io/t/database-issue/12865/1 "2021-04-07T19:04:49Z")

</div>

Hello Alexey,

I see you are a nice guy which helping all users.  
I have one trouble with my node1. When i make sudo docker stop/start storagenode it never remember Disk storage space. All the time there are the same statistics. After some days i see some ammount in trash but after reset a node it’s 0B. The same situation is with Online time. Is it database trouble? Is it good moment to make thread about it? I haven’t seen similiar problem on Storj forum.

I would be thankful for your reply.

Best regards.

---

<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:** [April 8, 2021, 8:57am UTC](https://forum.storj.io/t/database-issue/12865/2 "2021-04-08T08:57:58Z")

</div>



---

<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:** [April 8, 2021, 8:59am UTC](https://forum.storj.io/t/database-issue/12865/3 "2021-04-08T08:59:45Z")

</div>

Hi!  
Thank you for your warm words!

It’s worth to check your databases: [How to fix a "database disk image is malformed" – Storj](https://support.storj.io/hc/en-us/articles/360029309111-How-to-fix-a-database-disk-image-is-malformed-)  
And also please, post your `docker run` command between two new lines with three backticks (like these: ```). You can hide your personal info.  
If you running Windows GUI node, then please, check your disk for errors (the node should be stopped).

---

<div class="post-metadata">

**Author:** ![kosti11](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kosti11/32/1134_2.png) [@kosti11](https://forum.storj.io/u/kosti11)\
**Post date:** [April 11, 2021, 12:35pm UTC](https://forum.storj.io/t/database-issue/12865/4 "2021-04-11T12:35:00Z")

</div>

Hello.  
I didn’t think it would be a public post, I would write my greetings a bit differently 😃

I have checked my databases but i think it seems to be good.

 ![image](https://storj-s3.bcdn.literatehosting.net/original/2X/6/64c122e9a61959151f944e9b4dfcb72f25cfdf1d.jpeg)

Sorry that i don’t have copy of database check. I have only screen shot. I made it some days before.

Here’s the docker run command below:

```auto
sudo docker run -d --restart unless-stopped --stop-timeout 300 \
    --net host \
    -e WALLET="X" \
    -e EMAIL="X" \
    -e ADDRESS="X:XXXX" \
    -e STORAGE="X" \
    --mount type=bind,source="/mnt/storj/identity/storagenode/",destination=/app/identity \
    --mount type=bind,source="/mnt/storj/storage",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

```

---

<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:** [April 11, 2021, 12:37pm UTC](https://forum.storj.io/t/database-issue/12865/5 "2021-04-11T12:37:48Z")

</div>

I’ll move any private message to the public section unless it contains a private information.  
Usually every single question is asked before and the answer could help others.

---

<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:** [April 11, 2021, 12:43pm UTC](https://forum.storj.io/t/database-issue/12865/6 "2021-04-11T12:43:43Z")

</div>

The databases seems ok. Your command doesn’t contain any potential problems.  
Please, search your logs for errors:

```auto
docker logs storagenode 2>&1 | grep ERROR | tail

```

---

<div class="post-metadata">

**Author:** ![kosti11](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kosti11/32/1134_2.png) [@kosti11](https://forum.storj.io/u/kosti11)\
**Post date:** [April 11, 2021, 12:52pm UTC](https://forum.storj.io/t/database-issue/12865/8 "2021-04-11T12:52:20Z")

</div>

```auto
[opc@storj-bridge ~]$ sudo docker logs storagenode 2>&1 | grep ERROR | tail
2021-04-11T09:09:01.028Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "LAEQJZMRR5P2GERLVRKWCW2C3HB2ZUWINW755LHAC6TKCK5PROAA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T09:19:27.762Z ERROR piecestore failed to add bandwidth usage {"error": "bandwidthdb error: database is locked", "errorVerbose": "bandwidthdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:683\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Upload:413\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func1:1025\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:29\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:58\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:111\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:62\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:99\n\tstorj.io/drpc/drpcctx.(*Tracker).track:51"}
2021-04-11T09:59:08.569Z ERROR piecestore failed to add bandwidth usage {"error": "bandwidthdb error: database is locked", "errorVerbose": "bandwidthdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:683\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Upload:413\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func1:1025\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:29\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:58\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:111\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:62\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:99\n\tstorj.io/drpc/drpcctx.(*Tracker).track:51"}
2021-04-11T10:09:09.722Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "PBWJMPSUETQRZT4GZ36UAJSFGSJ36R4SSPAM6JXS34WMX3YB36OA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T10:09:10.163Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "LAEQJZMRR5P2GERLVRKWCW2C3HB2ZUWINW755LHAC6TKCK5PROAA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T10:52:52.639Z ERROR piecestore failed to add bandwidth usage {"error": "bandwidthdb error: database is locked", "errorVerbose": "bandwidthdb error: database is locked\n\tstorj.io/storj/storagenode/storagenodedb.(*bandwidthDB).Add:60\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).beginSaveOrder.func1:683\n\tstorj.io/storj/storagenode/piecestore.(*Endpoint).Upload:413\n\tstorj.io/common/pb.DRPCPiecestoreDescription.Method.func1:1025\n\tstorj.io/drpc/drpcmux.(*Mux).HandleRPC:29\n\tstorj.io/common/rpc/rpctracing.(*Handler).HandleRPC:58\n\tstorj.io/drpc/drpcserver.(*Server).handleRPC:111\n\tstorj.io/drpc/drpcserver.(*Server).ServeOne:62\n\tstorj.io/drpc/drpcserver.(*Server).Serve.func2:99\n\tstorj.io/drpc/drpcctx.(*Tracker).track:51"}
2021-04-11T11:09:01.563Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "PBWJMPSUETQRZT4GZ36UAJSFGSJ36R4SSPAM6JXS34WMX3YB36OA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T11:09:02.145Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "LAEQJZMRR5P2GERLVRKWCW2C3HB2ZUWINW755LHAC6TKCK5PROAA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T12:08:58.418Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "PBWJMPSUETQRZT4GZ36UAJSFGSJ36R4SSPAM6JXS34WMX3YB36OA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}
2021-04-11T12:09:00.388Z ERROR collector unable to delete piece {"Satellite ID": "12L9ZFwhzVpuEKMUNUqkaTLGzwY9G24tbiigLiXpmZWKwmcNDDs", "Piece ID": "LAEQJZMRR5P2GERLVRKWCW2C3HB2ZUWINW755LHAC6TKCK5PROAA", "error": "pieces error: filestore error: file does not exist", "errorVerbose": "pieces error: filestore error: file does not exist\n\tstorj.io/storj/storage/filestore.(*blobStore).Stat:99\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).pieceSizes:239\n\tstorj.io/storj/storagenode/pieces.(*BlobsUsageCache).Delete:220\n\tstorj.io/storj/storagenode/pieces.(*Store).Delete:298\n\tstorj.io/storj/storagenode/collector.(*Service).Collect:97\n\tstorj.io/storj/storagenode/collector.(*Service).Run.func1:57\n\tstorj.io/common/sync2.(*Cycle).Run:152\n\tstorj.io/storj/storagenode/collector.(*Service).Run:53\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2.1:81\n\truntime/pprof.Do:40\n\tstorj.io/storj/private/lifecycle.(*Group).Run.func2:80\n\tgolang.org/x/sync/errgroup.(*Group).Go.func1:57"}

```

---

<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:** [April 11, 2021, 1:05pm UTC](https://forum.storj.io/t/database-issue/12865/9 "2021-04-11T13:05:07Z")

</div>

How is your disk connected?  
What is the filesystem?  
What is the type of the disk? Is it SMR?

---

<div class="post-metadata">

**Author:** ![kosti11](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/kosti11/32/1134_2.png) [@kosti11](https://forum.storj.io/u/kosti11)\
**Post date:** [April 11, 2021, 1:13pm UTC](https://forum.storj.io/t/database-issue/12865/10 "2021-04-11T13:13:08Z")

</div>

My disk is connected directly to Synology NAS. Main server is on another location. Synology is server for storage. Both servers are connected through SSHFS because of my LTE ISP gives 2-3 NAT’s. I know it isn’t the best solution for Storj but i don’t have any better option. Now I’m waiting for new faster and more “server friendly” ethernet.  
There’s no any RAID group yet with him. Filesystem is BTRFS.  
It’s WD Desktop Elements 14TB. I think it’s CMR drive because of very big capacity.

---

<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:** [April 11, 2021, 1:15pm UTC](https://forum.storj.io/t/database-issue/12865/11 "2021-04-11T13:15:38Z")

</div>

The Synology fixed most of problems with BTRFS in their version as far as I know.  
The problem seems more related to SSHFS  
Why you do not run the node on Synology?

And you have this problem for a long time: [Bandwidth 0GB, but node is working correctly](https://forum.storj.io/t/bandwidth-0gb-but-node-is-working-correctly/12037)  
Please, do not use SSHFS
