# Unknown flag: --storage2.piece-scan-on-startup

**URL:** <https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017>\
**Category:** troubleshooting\
**Tags:** docker\
**Created:** [June 20, 2023, 6:04am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017 "2023-06-20T06:04:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![agente](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/agente/32/1137_2.png) [@agente](https://forum.storj.io/u/agente)\
**Post date:** [June 20, 2023, 6:04am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/1 "2023-06-20T06:04:09Z")

</div>

Something changed on this flag?

---

<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:** [June 20, 2023, 6:20am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/2 "2023-06-20T06:20:11Z")

</div>

> [@Enabling the Lazyfilewalker](https://forum.storj.io/t/enabling-the-lazyfilewalker/22966):
>
> There were several discussions and open concerns related to [filewalker](https://forum.storj.io/search?q=filewalker) processes (such as garbage collection and the used-space calculation services) competing for disk IOPS with same priority as more important services such customer downloads/uploads, audits and repairs. The community introduced workarounds to disable the initial used-space calculation on startup by adding the --storage2.piece-scan-on-startup flag. The lazyfilewalker runs the used-space calculation and garbage collection filew…

---

<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:** [June 20, 2023, 6:25am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/3 "2023-06-20T06:25:56Z")

</div>

Depends on how you trying to pass it.  
The correct options are:

- after the image name (docker)
- in the `storagenode run` command (service)
- as an environment variable `STORJ_STORAGE2_PIECE_SCAN_ON_STARTUP`
- as an option `storage2.piece-scan-on-startup:` in the `config.yaml` file

So please provide your `docker run` command (you may mask the private info).

---

<div class="post-metadata">

**Author:** ![agente](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/agente/32/1137_2.png) [@agente](https://forum.storj.io/u/agente)\
**Post date:** [June 20, 2023, 6:26am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/4 "2023-06-20T06:26:43Z")

</div>

Sorry. I will clarify my question. I’m using --storage2.piece-scan-on-startup=false in my docker run settings and I have an unknown flag error.

---

<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:** [June 20, 2023, 6:30am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/5 "2023-06-20T06:30:40Z")

</div>

Passing via `RUN_PARAMS` will lead to a various errors, because it’s now passed differently, see

> <https://github.com/storj/storagenode-docker/blob/21b0028b8e02a7fea2370c06360a0250c7ec603f/docker/entrypoint#LL51C1-L51C11>

and storagenode-updater did not recognize most of storagenode options, include this one.

---

<div class="post-metadata">

**Author:** ![agente](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/agente/32/1137_2.png) [@agente](https://forum.storj.io/u/agente)\
**Post date:** [June 20, 2023, 6:44am UTC](https://forum.storj.io/t/unknown-flag-storage2-piece-scan-on-startup/23017/6 "2023-06-20T06:44:19Z")

</div>

Thanks. I was using it before image name (docker) 😒
