Node not working, bandwidth.db corrupted

Hello,
when trying to start my node I get an 1067 error message by Windows Services. After searching through Google and some threads here on the forum I managed to identify the bandwidth.db as corrupted.

Error: file is not a database
bandwidth.db
heldamount.db ok
info.db ok
notifications.db ok
orders.db ok
pieceinfo.db ok
piece_expiration.db ok
piece_spaced_used.db ok
pricing.db ok
reputation.db ok
satellites.db ok
secret.db ok
storage_usage.db ok
used_serial.db ok

When following the steps in this guide I get an error at step 13.

Error: near line 1: near “?PRAGMA”: syntax error

When checking the size of the newly created bandwidth.db it’s 0.
Can somebody here help me out?

Hello @hpeter,
Welcome to the forum!

Unfortunately the error like this:

is not recoverable. The only way is to re-create it.

  1. Stop the storagenode either via Services applet or via elevated PowerShell:
Stop-Service storagenode
  1. Remove bandwidth.db
  2. Move all remaining *.db to the backup folder
  3. Start the storagenode
Start-Service storagenode

It should create all databases, but they will be empty

  1. Stop the storagenode
  2. Restore backed up databases with overwrite
  3. Start the storagenode
  4. Check your logs: How do I check my logs? - Storj Docs
1 Like

Hello @Alexey,
thanks for your help. Now the node is working again.
I’m using an USB drive which is listed as iscsi drive in device manager. According to the end of the guide I linked it states iscsi drives should be fine? Just trying to figure out how to prevent this from happening again. May be you have an idea?

Anyway, thanks again for your help!

1 Like

Unlikely it listed as iSCSI: iSCSI - Wikipedia
More like SCSI.
However, the USB is not reliable disks and they are not intendent for always-on load. You also need to have an external power supply for this external drive.
It’s better to use internal disks instead.

1 Like

Ah you’re right, my bad. Mhh unfortunately it isn’t possible for me to use internal drives. Using a somewhat broken laptop as machine right now.

I see. Then you need an external power supply for your disk. Please, also keep in mind - USB controllers on laptop and in the external case could overheat during high load and this could lead to disconnection. As result - you could have corrupted files or even the whole disk.

So, make sure that they cooling enough, and also don’t forget to add an external power supply to your external disk, if you would use only USB, it could be not enough during constantly load and disk could be disconnected as well.
All power saving functions for USB and external disk should be switched off too (it’s not necessary, but your node could lose the race for pieces while HDD is spinning up. And also it could lead to corruption too, if laptop going into sleep mode for example).

1 Like

Okay, used some left over mesh steel I had laying around to build some kind of ghetto case for the drives. Added two 120mm fans to it, so airflow should be fine. All sleep functions are deactivated.

1 Like