Why is used space slowly but surely decreasing?

For an experiment I changed the storage.allocated-disk-space to be below the total used, and without any customer data being deleted (so latest GC run is 0, trash is 0), the used space is very slowly, but surely decreasing. Why?
(the used space value is coming straight from the storagenode binary’s prometheus metric: used_space{field=“recent”})

Expiration dates for some pieces set and reached?

1 Like

I thought so too but expired pieces are collected by GC. OP mentions GC is zero.

If the pieces are there, than maybe a bug in mon kit or in the file walker.

Expired pieces can be deleted both by GC and by a dedicated service, storagenode/collector/service.go.

2 Likes

Depends on the expiration type. The customer may set an expiration date during upload, it will be deleted by the other service. The remained can be collected by the Garbage Collector.

@raert please search in logs for expired.

1 Like

I understand. I looked at the code given by @Toyoo. There is a a “package collector service” that runs every hour while there is retain service aka GC that collects garbage data. IIRC GC runs every 5 days.

1 Like

You may use a logrotate binary

or this script:

2 Likes