Used space slowly going down after deleting files

RAID, Volume, storage pool, hard drive, USB, SSD cache and iSCSI LUN
Locked
User avatar
vlad
Posts: 6
Joined: 04 Jun 2023, 16:43

Used space slowly going down after deleting files

Post by vlad »

I have a TNAS F5-422 on TOS 4.2.40. After deleting a few large files from a SMB share, 3 TB total, it took about an hour for the free disk space to actually reflect the difference. It was very slowly going up, KB by KB, regardless which tool I used to check the free disk space (SSH, SMB, Web UI). The volume filesystem is ext4, and I don't use any snapshots.

I find this behavior very strange. Is this normal? And if so, why is it happening? I have quite a lot of experience with Linux systems, and I've never seen such odd behavior.
User avatar
TMroy
TM Support
Posts: 3060
Joined: 10 Mar 2020, 14:04
China

Re: Used space slowly going down after deleting files

Post by TMroy »

The time it takes for the system to release available storage space after deleting 3TB of data on an ext4 file system can vary depending on several factors, including:

Hardware performance:** Faster storage devices like SSDs will typically release space faster than slower HDDs.
Filesystem activity:** If the system is actively writing to the disk, the process of reclaiming space from deleted files may be delayed.
Background processes:** Certain background processes, like TRIM on SSDs, may handle reclaiming space asynchronously, meaning the reported available space may not immediately reflect the actual freed space.
File deletion method:** Different methods, like secure deletion, may involve additional steps that can impact the release time.

General estimates:

Typical HDD: Releasing 3TB of space could take anywhere from minutes to several hours.
Typical SSD: Release times could be significantly faster, potentially in the range of seconds to minutes.

Factors that can contribute to delays:

Open files: If any deleted files are still open by applications, the space won't be immediately available.
Filesystem fragmentation: Fragmented files can make it harder for the system to reclaim space efficiently.
Filesystem overhead: Some ext4 features like journaling can introduce additional overhead during the space reclamation process.

Tips for faster space release:

Reboot the system: This can trigger background processes that reclaim space.
Run `trim` command (SSD only): This instructs the SSD to erase unused blocks and make them available.
Defragment the filesystem: This can improve space efficiency and potentially speed up reclamation.
Use a secure deletion tool: These tools overwrite the deleted data, but they may take longer to complete.

Remember, these are just general estimates, and the actual time it takes for your system to release space can vary depending on your specific configuration.

I hope this information helps you understand the factors that influence the space release process in ext4!
To contact our team, please send email to following addresses, remember to replace (at) with @:
Support team: support(at)terra-master.com (for technical support only)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
tucca66
Posts: 2
Joined: 27 Dec 2023, 17:56

Re: Used space slowly going down after deleting files

Post by tucca66 »

While I can't say for sure if it's "normal", I've heard similar reports from other F5-422 users. Apparently, it can be related to how the TNAS handles file deletion with ext4 filesystems and background data scrubbing processes. This scrubbing can take some time, especially after large file deletions, and may be the culprit behind the slow space recovery.
Locked

Return to “Storage”