How do I empty the trash?

Trash is currently roughly 5% of the “used” space. ~49 Gb in total.

I have been checking it and it’s not deleting itself. It just continues to grow. Any ideas on how I empty the trash folder?

I’m in my 6th month as a node operator if that matters at all.

Trash data remains in trash folder for 7 days, after which that space is freed up.

Here’s a few other posts where this was asked/discussed:

So short story, short: No action is required by you with regards to trash folder. Pieces that have been there past the “retention period” will be automatically removed and disk space becomes available once again for new uploads.

3 Likes

I understand what you are saying. That is not what is happening with my node. The trash folder just keeps getting bigger and bigger week after week. I have never seen it decrease at all let alone drop to zero.

There is just new trash flowing in as well. It definitely gets deleted after 7 days.

3 Likes

exactly what @BrightSilence said. The existing trash gets deleted, but if there continue to be more deletes then it may appear that the size is never shrinking.

to put it in perspective. here are a couple of graphs that show my “disk stats” which are cumulative of my six nodes over the past 30 days…
image

you can see in the trash line that it goes up as more deletes occur and then goes down after the 7 day period concludes, but I do understand what you are also saying…as you can see in my graph, there definitely has been an “up trend” in the amount of trash data over the past month…just means lots of deletes are occurring.

1 Like

This trash graph would make for a nice haircut.

4 Likes

I see now. Thank you all for the replies.

2 Likes

Sorry for resurrecting this old thread, but I have some folders in the trash that are a bit old. After 7 days shouldn’t they throw themselves?
1

The folders won’t get deleted, only the files inside.

2 Likes

Thanks for the reply.
Can I throw subfolders away? Or just the files?

You should never throw anything away manually. Files older than 7 days will be deleted automatically.

2 Likes

If they are not empty you should not delete them.

If they are empty — there is no benefit in deleting them.

Either way — let them be. Let the node manage its data. I fully agree with @donald.m.motsinger advice above.

2 Likes

But there are files from 2021…
that the nas takes hours to count and occupy dozens of gigs

1 Like

Inside the folder? Or do you mean the timestamp of the folder?

Few things here

  • are all files from 2021? How do you know?
  • Dozens of gigs is not amount of space that is worth worrying about
  • It should not take hours to enumerate them – that’s the issue that needs to be addressed: otherwise, assuming latency is so high, you are likely losing more races than necessary, diminishing your payouts.

What is is the system running? Do you have enough free ram available for caching? You may want to pre-warm the metadata cache by enumerating all files at least once on every boot. If you also run samba on the same server – it will be evicting most of your filesystem caches, so this is another angle to consider.

You can do this:

find /storj91/storage/storage -mtime +90 -type f -print

This will print all files created/modified in the past 90 days. See if you have any.

You can then replace -print with -delete to delete them if you really want to – but I would not: it’s like renting a house to someone: storagenode uses the space as it pleases. I would not come in and start moving furniture. :slight_smile:

1 Like

Sorry, the folders have an old date but the files inside are recent. The NAS has a Realtek 4 core with 1.5GB of RAM.
Thanks anyway

If you delete files/folders in trash, your node could get disqualified. Don’t touch anything in there. The top 6 folders corespond to the 6 satellites; each sat has it’s own trash folder.
And the trash is like the recycle bin on your computer I think; if a client deleted something and wants to retrieve it, it has 7 days to do it. If you delete his data and he could not find it, that means your node lost data and is unreliable, and will get disqualified.
From what I learned so far here, on the forum, the only folder that requires some manual maintenance is temp folder, not trash folder or others. In temp folder could remain files that aren’t automaticaly removed, and after 72h they can be deleted. But they are very rare. You could do this once per year, after stoping the node.
Anyway, we all see the same huge trash folders, so you’re not the only one.

1 Like

Questions:

  • is the trash space payed for? By who? By the client? Or just by Storj?

Thanks to all for the clarifications. I had doubts precisely because it can be done in the temp folder, and I had seen the dates of the folders, not those of the files. I don’t throw anything. In addition, my node went from 5.5 to 6.5 Tb in one day, and on the dashboard I found 300 Gb overused

This is a problem right there. Assuming ext4 filesystem, minimum size of metadata is 256 bytes per file (index node structure). If you have 5M files (not unusual on an average sized node) this combines to 1.2GB, that definitely won’t fit in ram, simply because your also need space for OS and software.

This means most accesses to metadata on your appliance involve roundtrip to disk and are ridiculously slow.

As a side effect, your node is earning less because someone else, who has metadata cached, can start sending data to customers sooner, while your node still scrambles to find the file.