# The hard drive usage is very high

**URL:** <https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227>\
**Category:** troubleshooting\
**Tags:** hardware\
**Created:** [October 13, 2024, 2:41pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227 "2024-10-13T14:41:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 13, 2024, 2:41pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/1 "2024-10-13T14:41:55Z")

</div>

The hard drive usage is very high. Specifically, the service stopped because of it last night. What can be done to limit it? My other question is, what causes the decrease in occupied space, and why is the trash size so large? Is this normal? There are too many small files on the hard drive (millions), and moving them all at once is overloading it, leaving no real speed

 ![paint2](https://storj-s3.bcdn.literatehosting.net/original/3X/7/2/72e1a6a9a746c8c5d2404dc7a1e6c1d430c576e3.jpeg)  
 ![paint1](https://storj-s3.bcdn.literatehosting.net/original/3X/6/5/653a04a38da66800148902b17e25958d37688cad.jpeg)

---

<div class="post-metadata">

**Author:** ![Roxor](https://storj.bcdn.literatehosting.com/letter_avatar/roxor/32/6_449c533f586939b6e5f246632a46421f.png) [@Roxor](https://forum.storj.io/u/Roxor)\
**Post date:** [October 13, 2024, 2:49pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/2 "2024-10-13T14:49:16Z")

</div>

Storj dices everything up into small files: it’s normal to see 3-4million files per TB. And by default any time it restarts (such as an automatic upgrade every two weeks or so) it will rescan those files to find up how much space they use. Depending on how many files and the speed of your HDD… that scan can take a couple minutes, or a couple hours, or a couple days… and while it’s running your disk will be used 100%.

Storj nodes also periodically get notices from the servers about which files they should be keeping (so they know which can be deleted)… so it’s also normal to have some trash hanging around. Each batch of trash is kept seven days before it’s deleted… in case there are any problems and the files need to be recovered. And every time files get moved from your regular space to trash… your used-space number goes down and trash goes up.

So everything you described so far sounds normal: and if you wait a day or two your HDD should go back down closer to idle. And unless more trash is created… the trash count will go down in a week.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 13, 2024, 2:51pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/3 "2024-10-13T14:51:21Z")

</div>

Thank you for your response, I will wait patiently. This state has been ongoing for 7 days. I hope it gets resolved soon 🙂

---

<div class="post-metadata">

**Author:** ![Ruskiem](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/ruskiem/32/64_2.png) [@Ruskiem](https://forum.storj.io/u/Ruskiem)\
**Post date:** [October 13, 2024, 2:53pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/4 "2024-10-13T14:53:20Z")

</div>

yea, as roxor said, in addition You can try new feature with whole disk space acknowledge, to avoid that files scanning in every restart,  
aaaaaand the badger catch, just look around the forum after those phrases and You will find topics.

> [@The whole disk/partition allocation feature](https://forum.storj.io/t/the-whole-disk-partition-allocation-feature/28192/15):
>
> Should then “storage.allocated-disk-space:” be commented?

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 13, 2024, 5:45pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/5 "2024-10-13T17:45:53Z")

</div>

Something is really off here. This is not normal. The service has crashed again with an error. The disk is at 100% usage, and the program cannot access it.

 ![{CD901E4A-2248-4A60-AF4B-6CFBC6BF72A2}](https://storj-s3.bcdn.literatehosting.net/original/3X/2/5/25c31350cc91e0f2cdb1fd914221e2f97dd9caad.png)

---

<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:** [October 14, 2024, 6:09am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/6 "2024-10-14T06:09:38Z")

</div>

Could you please search for FATAL/Unrecoverable error somewhere earlier in your logs?  
You may use the PowerShell:

```auto
sls "FATAL|Unrecoverable" "C:\Program Files\Storj\Storage Node\storagenode.log" | select -last 10

```

You likely have a readability or writeability check timeout. This is usually mean that the disk is too slow to read or write a small file. There are several ways to improve the speed of the disk:

1. Perform a defragmentation
2. disable atime: [[Solved] Win10 20GB Ram Usage - #17 by arrogantrabbit](https://forum.storj.io/t/topic/26465/17)
3. [NTFS Disable 8dot3name](https://forum.storj.io/t/topic/25624/1)
4. Add more RAM
5. Use tiered storage and add SSD as a cache

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 14, 2024, 7:53am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/7 "2024-10-14T07:53:13Z")

</div>

![{2A320F7D-EBF7-45EB-9016-299FD4445B4C}](https://storj-s3.bcdn.literatehosting.net/original/3X/6/1/61df687962d84b415cacf2edd432c9b6582933af.png)  
 ![paint3](https://storj-s3.bcdn.literatehosting.net/original/3X/0/4/0451ce5fb1773d3ce84d0a594b099e7aad41c2ce.jpeg)

The last few days only, as I deleted the log content, it was almost 10GB already.

Does regular defragmentation cause any problems?

Specifically, the entire disk is completely fragmented.

I would move the database to an SSD, could you help with that? It seems that due to the load, it couldn’t read it, and that’s probably why it’s crashing.  
Unfortunately, I’m not a programmer, but if there’s some guidance, I can follow it.

---

<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:** [October 14, 2024, 8:48am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/8 "2024-10-14T08:48:17Z")

</div>

The regular defragmentation would keep your filesystem fast, so the node shouldn’t crash because of a failed check. However, on the photo of your logs there is an error, that it cannot open a database. I would recommend to check your disk for errors and fix them.  
You do not need to be a programmer to configure the node.  
To move databases to SSD you may follow this guide:

> [@Move databases on Windows storagenode](https://forum.storj.io/t/topic/9552/2):
>
> Yes, you can. Stop the storagenode Move databases to a new place (C:\storagenode\cache\ for example) Add a new path to databases to the storage2.database-dir: option: storage2.database-dir: C:\storagenode\cache\ Save the config Start the storagenode Check that you do not have a new databases in a old place and the dashboard shows a correct numbers. However, keep in mind - you will introduce a new point of failure.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 14, 2024, 9:03am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/9 "2024-10-14T09:03:31Z")

</div>

The hard drive is not showing any errors; it’s in 100% condition. In my opinion, the reason it couldn’t read the database is that it is under so much load at that moment. Do the highlighted files in the picture belong to the database? Should I copy these to the SSD drive?

 ![{8B62ADCA-5D82-4013-833F-59A106A52D4E}](https://storj-s3.bcdn.literatehosting.net/original/3X/5/2/52497f21ee0a24b926ff50777216da5c8113033a.png)  
 ![image](https://storj-s3.bcdn.literatehosting.net/original/3X/4/5/4539d75d874ff07f4185be382524bbb8a641a03f.png)

---

<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:** [October 14, 2024, 9:33am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/10 "2024-10-14T09:33:31Z")

</div>

Yes, all files with the `*.db` extension are databases. You need to copy/move them to SSD when the node is stopped. You also need to specify a new path to the databases with the `storage2.database-dir:` parameter in your `config.yaml` file, save it and start the node.  
You should not have errors in your logs after that.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 14, 2024, 9:45am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/11 "2024-10-14T09:45:25Z")

</div>

is this correct?

![paint4](https://storj-s3.bcdn.literatehosting.net/original/3X/2/6/269a7a0145db26b430e9bd96a0574dbe027b46ad.jpeg)

or

storage2.database-dir: C:\Program Files\Storj\database

---

<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:** [October 14, 2024, 11:31am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/12 "2024-10-14T11:31:32Z")

</div>

Both should work. However, it’s better to have it with quotes, because the path contains the space.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 14, 2024, 11:50am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/13 "2024-10-14T11:50:27Z")

</div>

Unfortunately, it didn’t work. If I make a modification in this line, the service fails to start and gives an error. I tried with and without quotes. The path is correct. Could it be a permissions issue? I will try putting it on another SSD drive that is not a system partition.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 14, 2024, 2:21pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/14 "2024-10-14T14:21:31Z")

</div>

So it’s as if it can’t find the database files, and that’s why it can’t start. This must be the issue for sure.

---

<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:** [October 14, 2024, 2:57pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/15 "2024-10-14T14:57:49Z")

</div>

Please make sure, that the database files in this folder. You also need to change the owner to the SYSTEM user, it should have write, delete and edit permissions.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 17, 2024, 5:12am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/16 "2024-10-17T05:12:45Z")

</div>

Unfortunately, we were still unable to transfer it. The permissions are in order. The database is not visible. The service crashed again at 4 a.m. today

---

<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:** [October 17, 2024, 7:10am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/17 "2024-10-17T07:10:05Z")

</div>

> [@havri1](#):
>
> If I make a modification in this line, the service fails to start and gives an error.

Then, please, post the error which you receive.

> [@havri1](#):
>
> The service crashed again at 4 a.m. today

What was the reason? It should be an FATAL or Unrecoverable errors.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 17, 2024, 12:26pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/18 "2024-10-17T12:26:59Z")

</div>

I managed to transfer the database. There was a permission issue. The defragmentation is also complete. We’ll see how things change now. Disk usage has significantly decreased, and data traffic has started as well.

---

<div class="post-metadata">

**Author:** ![havri1](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/havri1/32/1138_2.png) [@havri1](https://forum.storj.io/u/havri1)\
**Post date:** [October 19, 2024, 1:22pm UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/19 "2024-10-19T13:22:28Z")

</div>

2024-10-19T15:18:43+02:00 WARN collector unable to delete piece {“Satellite ID”: "12EayRS2…

It’s unbelievable that it always has some problem. Right now, it can’t delete files. The log size is 123 GB!!! It filled up the system drive. Is this program really that amateurish?

It can’t stop the service; it only works with force or restart. Unbelievable… unbelievable…

2024-10-19T15:12:03+02:00 WARN collector unable to delete piece {“Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Piece ID”: “SH6TQADNSVCSA7BQRGV24CVFVJVLDY6SZJTD3YWSMAB4SWURV3OQ”, “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:126\n\tstorj.io/storj/storagenode/pieces.(\*BlobsUsageCache).pieceSizes:350\n\tstorj.io/storj/storagenode/pieces.(\*BlobsUsageCache).DeleteWithStorageFormat:329\n\tstorj.io/storj/storagenode/pieces.(\*Store).DeleteSkipV0:375\n\tstorj.io/storj/storagenode/collector.(\*Service).Collect:111\n\tstorj.io/storj/storagenode/collector.(\*Service).Run.func1:68\n\tstorj.io/common/sync2.(\*Cycle).Run:99\n\tstorj.io/storj/storagenode/collector.(\*Service).Run:64\n\tstorj.io/storj/private/lifecycle.(\*Group).Run.func2.1:87\n\truntime/pprof.Do:44\n\tstorj.io/storj/private/lifecycle.(\*Group).Run.func2:86\n\tgolang.org/x/sync/errgroup.(\*Group).Go.func1:78”}

---

<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:** [October 20, 2024, 5:55am UTC](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227/20 "2024-10-20T05:55:25Z")

</div>

> [@havri1](#):
>
> It’s unbelievable that it always has some problem. Right now, it can’t delete files. The log size is 123 GB!!!

> [@Collector unable to delete piece](https://forum.storj.io/t/collector-unable-to-delete-piece/28290/4):
>
> It’s not a bug, it’s a normal behavior, if the customer deleted the TTL data before its expiration, so the garbage collector already moved these pieces to the trash, thus TTL collector complains. You may ignore this WARN. Or you may configure the custom log level for this chore, see [--log.custom-level](https://forum.storj.io/t/log-custom-level/25839). You may also temporary change the log level via debug port: [Guide to debug my storage node, uplink, s3 gateway, satellite](https://forum.storj.io/t/guide-to-debug-my-storage-node-uplink-s3-gateway-satellite/1372).

> [@\--log.custom-level](https://forum.storj.io/t/log-custom-level/25839/18):
>
> New version: docker run ... \ --log-driver json-file \ --log-opt max-size=10m \ --log-opt max-file=3 \ --name storagenode storjlabs/storagenode:latest \ --log.level=info \ --log.custom-level=piecestore=FATAL,collector=FATAL,blobscache=FATAL \ ...

[Next page](https://forum.storj.io/t/the-hard-drive-usage-is-very-high/28227.md?page=2)
