# Deleted pieces will be sent to trash by default

**URL:** <https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931>\
**Category:** Node Operators\
**Created:** [April 9, 2021, 7:53pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931 "2021-04-09T19:53:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennifer](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jennifer/32/60_2.png) [@jennifer](https://forum.storj.io/u/jennifer)\
**Post date:** [April 9, 2021, 7:53pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/1 "2021-04-09T19:53:45Z")

</div>

Hi SNOs,  
The next software upgrade includes a change that will by default send piece deletions to the trash rather than immediately removing them from disk. This is a temporary precaution to avoid failing audits for pieces that were deleted between satellite database backups if we have to restore from a previous backup. Each node still has the option to turn this configuration off, but we highly recommend you keep it on. It is very unlikely that we will have to restore from a satellite database backup (we have never had to restore from backup thus far), but in the event we do, this will be the only way for you to avoid audit failures and potential disqualification.  
Again, we understand this is not an ideal solution but we will be implementing a better solution in the coming months.  
You may check out the change [here](https://github.com/storj/storj/commit/71072eb593d1ac60c019fb74d3fc8676dd310038)

---

<div class="post-metadata">

**Author:** ![Stob](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/stob/32/1137_2.png) [@Stob](https://forum.storj.io/u/Stob)\
**Post date:** [April 10, 2021, 11:46am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/2 "2021-04-10T11:46:36Z")

</div>

Just a question - If a database backup was restored would the piece deletions be moved out of trash and back into the original storage location?

---

<div class="post-metadata">

**Author:** ![NotPaidForBugReport](https://storj.bcdn.literatehosting.com/letter_avatar/notpaidforbugreport/32/6_449c533f586939b6e5f246632a46421f.png) [@NotPaidForBugReport](https://forum.storj.io/u/NotPaidForBugReport)\
**Post date:** [April 11, 2021, 8:54am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/3 "2021-04-11T08:54:16Z")

</div>

Then you have to pay (fo trash storage) for your bad ideas.

---

<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:** [April 11, 2021, 10:27am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/4 "2021-04-11T10:27:56Z")

</div>

Why do you want to be paid twice for storage ?

---

<div class="post-metadata">

**Author:** ![andrew2.hart](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/andrew2.hart/32/6415_2.png) [@andrew2.hart](https://forum.storj.io/u/andrew2.hart)\
**Post date:** [April 11, 2021, 10:52am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/5 "2021-04-11T10:52:39Z")

</div>

Why not store the list of recent deletes in tardigrade? Then they can be re-applied after the backup is restored

---

<div class="post-metadata">

**Author:** ![littleskunk](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/littleskunk/32/63_2.png) [@littleskunk](https://forum.storj.io/u/littleskunk)\
**Post date:** [April 11, 2021, 11:05am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/6 "2021-04-11T11:05:35Z")

</div>

> [@Stob](#):
>
> If a database backup was restored would the piece deletions be moved out of trash and back into the original storage location?

Yes that is our short term solution while we work on a better solution.

> [@andrew2.hart](#):
>
> Why not store the list of recent deletes in tardigrade?

That is what the better solution would do. Storage nodes just keep the delete message and if the satellite requests an audit for a piece that was deleted the storage node can proof it with a signed delete message. Problem right now is that we didn’t had the time to implement it.

---

<div class="post-metadata">

**Author:** ![NotPaidForBugReport](https://storj.bcdn.literatehosting.com/letter_avatar/notpaidforbugreport/32/6_449c533f586939b6e5f246632a46421f.png) [@NotPaidForBugReport](https://forum.storj.io/u/NotPaidForBugReport)\
**Post date:** [April 11, 2021, 11:15am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/7 "2021-04-11T11:15:15Z")

</div>

> [@nerdatwork](#):
>
> Why do you want to be paid twice for storage ?

Why twice? Deleted = not paid. Trash = free storage.

---

<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:** [April 11, 2021, 11:24am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/8 "2021-04-11T11:24:31Z")

</div>

Don’t all databases support online/hot backups these days: do you need to bring the satellites down for them? (if the problem is that backups aren’t timely: isn’t the solution just to perform them more often?)

I have no problem with having a bit more trash hanging around: I think most of us still have tons of free space 🙂

---

<div class="post-metadata">

**Author:** ![cdhowie](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/cdhowie/32/60_2.png) [@cdhowie](https://forum.storj.io/u/cdhowie)\
**Post date:** [May 5, 2021, 6:02am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/9 "2021-05-05T06:02:01Z")

</div>

Hot standby replicas are not backups, they are redundancy. There is a big difference.

Redundancy is for uptime – your hardware is malfunctioning or someone broke the primary config, so we switch to the replica.

Backups are for disaster recovery.

If a human accidentally runs a too-broad update/delete operation on the database, replication is going to happily ship the update to the standby and it won’t help you recover your mistake. Other forms of data loss could also be replicated to the standby replica.

---

<div class="post-metadata">

**Author:** ![striker43](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/striker43/32/1135_2.png) [@striker43](https://forum.storj.io/u/striker43)\
**Post date:** [June 1, 2021, 11:23am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/11 "2021-06-01T11:23:33Z")

</div>

I currently have 21 Tb stored but trash is only 102GB. Maybe some of your pieces already got repaired during your one hour downtime and get deleted now on your node?

---

<div class="post-metadata">

**Author:** ![striker43](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/striker43/32/1135_2.png) [@striker43](https://forum.storj.io/u/striker43)\
**Post date:** [June 1, 2021, 12:04pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/13 "2021-06-01T12:04:00Z")

</div>

Hmm my trash is constant at 102 Gb…

Did you check your logs?

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [June 1, 2021, 12:17pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/15 "2021-06-01T12:17:19Z")

</div>

This is really curious, these lines are not garbage collection, but normal deletes, unless they changed the wording for garbage collection to be the same (sure hope not). But I’m not seeing any of these. Barely any deletes at all lately.

---

<div class="post-metadata">

**Author:** ![baker](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/baker/32/6110_2.png) [@baker](https://forum.storj.io/u/baker)\
**Post date:** [June 1, 2021, 12:41pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/16 "2021-06-01T12:41:05Z")

</div>

I was actually thinking to myself the other day that since the change I haven’t seen an increase in the amount of data in the trash. Pretty much the same levels as before, although I don’t track it so this is just and anecdotal observation. 1 GB / 3.55 TB and 500 MB / 1.74 TB.

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [June 2, 2021, 10:24pm UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/17 "2021-06-02T22:24:16Z")

</div>

Yeah there have been very few deletes recently.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [February 4, 2022, 6:13am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/18 "2022-02-04T06:13:51Z")

</div>

> [@jennifer](#):
>
> Again, we understand this is not an ideal solution but we will be implementing a better solution in the coming months.

I did not follow on this one. Are we having this ‘better solution’ in the meantime?

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [February 4, 2022, 10:28am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/19 "2022-02-04T10:28:30Z")

</div>

Doesn’t seem like it. I still have large amounts of data in trash.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [February 4, 2022, 10:31am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/20 "2022-02-04T10:31:56Z")

</div>

> [@BrightSilence](#):
>
> I still have large amounts of data in trash.

What percentage? I see 3.5% of amount data stored over all nodes.

---

<div class="post-metadata">

**Author:** ![BrightSilence](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/brightsilence/32/6048_2.png) [@BrightSilence](https://forum.storj.io/u/BrightSilence)\
**Post date:** [February 4, 2022, 11:10am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/21 "2022-02-04T11:10:06Z")

</div>

Percentage of total data isn’t really relevant. Percentage of monthly deletes is more interesting. And since I already calculate that for the earnings estimator (it’s just over 1% on average atm on my node)

But I’ll post both. I have a total of 38.8GB on my largest node. Which is:  
0.24% of data stored  
Since that’s 7 days worth of trash, lets multiply by 30/7 for 1.03% per month, which pretty much exactly matches the total amount of deletes on my node.

---

<div class="post-metadata">

**Author:** ![jammerdan](https://storj.bcdn.literatehosting.com/user_avatar/forum.storj.io/jammerdan/32/1121_2.png) [@jammerdan](https://forum.storj.io/u/jammerdan)\
**Post date:** [July 19, 2022, 4:27am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/22 "2022-07-19T04:27:06Z")

</div>

> [@jennifer](#):
>
> we will be implementing a better solution in the coming months.

It is now over a year since this claim. Are we still sending every deleted piece into trash instead of deleting them from the disk instantly?

---

<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 19, 2022, 6:35am UTC](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931/23 "2022-07-19T06:35:22Z")

</div>

Yes we still sending almost every deleted piece into trash, except expired. Expired pieces are deleted directly.

[Next page](https://forum.storj.io/t/deleted-pieces-will-be-sent-to-trash-by-default/12931.md?page=2)
