Best practices for checking /tmp and /mnt/HDA_ROOT space usage via SSH with df/du?

Environment:

  • OS: macOS

  • NAS Model: TS-264

  • Firmware: QTS 5.2.8

Hi everyone,

I’ve been troubleshooting an issue where my NAS gets stuck during shutdown, and came across this QNAP FAQ on how to check the shutdown log: https://www.qnap.com/en/how-to/faq/article/if-system-got-stuck-while-shutting-down-how-to-check-on-nas. While SSH’d in, I noticed the /tmp and /mnt/HDA_ROOT directories and wanted to better understand their space usage.

I’m familiar with the basics like df -h and du -sh, but I have a few questions:

  1. How to effectively find what’s consuming space? Are there any recommended advanced du commands or useful one-liners for digging into /tmp or /mnt/HDA_ROOT?

  2. How to tell what’s normal vs. abnormal? How large are these directories typically on a healthy system? At what point should I be concerned?

  3. What’s safe to clean up? If space is running low, which files can be safely deleted, and which should absolutely not be touched?

  4. Does QTS handle cleanup automatically? Does QTS have any built-in mechanism for automatically managing these directories? If so, I wouldn’t even need to bother with df/du or monitor the usage myself.

Would love to hear from anyone with experience. Thanks!

Hi and welcome to the forum. :slight_smile:

These locations are managed automatically by QTS. On a properly working NAS, their contents are created and deleted as-required. No user files are stored in them.

The only time to start messing with them is when they’re full. When that happens, QTS will alert you.

If you’re looking for a good sizing utility, I can highly recommend ncdu. It’s available by first installing the Entware QPKG.

1 Like

Thanks for the clarification! Good to know QTS handles the cleanup automatically.

Is there anywhere in the QTS GUI (e.g. Storage & Snapshots) that shows the current usage of these system files? Would be handy for a quick health check without needing to SSH in.

Not that I know-of, but I don’t spend a lot of time in the web UI. I’m more of a TUI/CLI user. :nerd_face:

How to check /tmp and /mnt/HDA_ROOT space usage via SSH terminal? | QNAP