SuMa storage cleanup - millions of empty folders

Hi there,

I’m part of a project and I have just discovered that the SuMa deployment in use has the bulk of the storage for packages etc. as a NFS mount from a NAS. This volume has nearly 2.5TB of data used by some 500,000 files but 2,250,000 folders. This means that, even if there would be a single file per folder, there’s still 1.75 million empty folders in there.

I assume this is either a historical build-up from packages meanwhile deleted (as files, but folders left there), or created there on purpose by SuMa - which would be a rather odd design pattern, but ok.

The problem is that all those empty folders still consume a significant amount of disk space, and make the entire volume fairly difficult to work with (replication, data integrity reports etc.).

I was unable to find on a quick search through the existing documentation anything about the management of disk space and clean-up of empty folders after removal of obsolete packages. I hope someone here can clarify if deleting all those empty folders is already part of a recommended disk maintenance procedure or, on the contrary, should be avoided because it would break SuMa.

This kind of question doesn’t seem to fit in the technical support categories, so I’m hoping someone here can advise. If this is already covered in existing product documentation or FAQs, I would really appreciate a pointer to it.

Many thanks in advance!

@Titel_Leontin Hi and welcome to the Forum :smile:
Have you seen;
https://documentation.suse.com/suma/4.3/en/suse-manager/administration/tshoot-diskspace.html
and
https://documentation.suse.com/suma/4.3/en/suse-manager/administration/space-management.html

1 Like

Thanks for the quick reply, and for the reading material :slight_smile: Let me dive in and come back if not clear.

1 Like

Hi @malcolmlewis1 ,

Having read the two articles provided, one covers the monitoring of specific folders with their alert thresholds for running out of empty space, and the other is for removal of redundant database entries. Neither of these seem to be related to the removal of millions of empty folders in storage.

I’ll ask my colleagues to go through the troubleshooting steps for removing redundant database entries.

Anything else that can be triggered from within SUMA or executed on the server to slim down the file structure and remove empty folders, in a way that does not impact functionality or supportability?

Thanks in advance!
Titel

@Titel_Leontin I’m not sure, on my instance that I did run, I didn’t really delve into the structure (also using local storage). Do you have unused channels/products in use?

The spacewalk-report feature may offer some insight into real usage.

Once your cleanup/investigation is completed, I would then look at raising a support request for clarification before deleting, my concern would be whilst an empty folder I suspect there is a database entry as well…

I’m a bit baffled as well. We also didn’t want risking deleting stuff randomly; after all, SUMA should be managing the storage and we shouldn’t be messing around with the backend outside of manufacturer’s operational/maintenance instructions, or at least with their confirmation that what we intend to do won’t break it.

It’s also an older version installed, so there may be older bugs related to the deletion of empty folders which meanwhile have been corrected. A colleague raised a support ticket anyway and SuSE was kind enough to advise that, although the product version is no longer in support, SUMA wouldn’t have any reason to keep empty folders around, so deleting the empty folders would not affect SUMA functionality.

1 Like