Quick question that stumps a lot of shops: how much of your disk is sitting in the IFS, and do you even know what is out there? Most shops have no idea.
For years, IBM i storage meant libraries and objects, and that is where all our attention went. But the Integrated File System has quietly become where a huge amount of modern data lives. Web server content, PASE and open source, vendor application files, PDFs, spool archives, transferred files people dropped and forgot. On many systems today, the IFS is one of the largest consumers of disk space, and it is also the part almost nobody audits.
You can see exactly what is out there:
SELECT PATH_NAME, OBJECT_TYPE,
DATA_SIZE, OBJECT_OWNER,
ACCESS_TIMESTAMP
FROM TABLE(QSYS2.IFS_OBJECT_STATISTICS(
START_PATH_NAME => '/',
SUBTREE_DIRECTORIES => 'YES'))
ORDER BY DATA_SIZE DESC
FETCH FIRST 50 ROWS ONLY;
That walks the IFS and hands you your fifty largest objects, their size, who owns them, and when they were last accessed.
One word of experience: starting at ‘/’ and walking the entire tree can be heavy on a system with a big IFS, so on a busy box, aim it at a subdirectory you are curious about first, like /home or /www or a vendor’s folder, and widen from there.
What you find is almost always a story. The multi-gigabyte log file some process has been writing to since 2012. The pile of transferred spool nobody cleaned up. The open source install nobody remembers doing. That ACCESS_TIMESTAMP column is the tell: big and recently used is the system working; big and untouched for two years is possible reclaimable space and a save window you are spending for nothing.
Go look at your IFS this week. If you have never run this, I promise you will find something that makes you say “What is that, and why is it eight gigabytes.”
Originally posted on LinkedIn. Join the conversation there.
Leave a Reply