I used GrandPerspective to scan a large-ish file server volume. GrandPerspective's scan stops after just 149 GB from one top-level subdirectory of the volume.
The upshot of this is that I can't use GrandPerspective to understand the overall space usage on this volume. Maybe I will get something useful done if I scan subsets of the volume one at a time.
How to reproduce:
Expected behaviour:
The scan view includes all 1.52 TB of files, and perhaps the 1.72 TB of free space, on the volume.
Observed behaviour:
The scan view includes only 147 GB, limited to partial contents of just one of the top-level directories of the volume. The rest of the volume contents are not visible.
This is with no file selected, and no focus or zoom effects.
The stats which the Info tab of GrandPerspective's control panel window reports are:
The Focus tab reports:
Discussion:
Observed with GrandPerspective 3.8.0, on macOS Sonoma 14.8.9, on a mac with Apple Silicon CPU.
Anonymous
I tried this on a subdirectory of the same server volume. Again GrandPerspective failed to read in more than about 10% of the directory. The directory contains 499 GB of content, as measured by
du -sh. The scan window in GrandPerspective showed only 42.1 GB.For what it's worth,
duon the server-mounted directory yielded manydu: cannot accesserrors. Alsoduperceives a circular directory structure. This is because the underlying file system has symlinks between directories which do form cycles, and the SMB software presents those symlinks as actual directories, leading to apparent infinitely-deep and circular directory structures. Maybe GrandPerspective is silently failing when it encounters these.GrandPerspective does not follow symlinks, as that does not help to get a good view of actual disk usage. However, every symlinked folder should be accessible also without following a symlink, so that does not explain why the app only finds a small subset of the actual files.
A possible reasons why GrandPerspective cannot find all files are lack of permissions. This could be because they are owned by a different user, or they are system files that require specific entitlements to be read (e.g. Data Vaults).
What you can do, is use the new logging to find out why certain directories are being skipped while scanning. See https://grandperspectiv.sourceforge.net/HelpDocumentation/HowToViewDiagnosticLogs.html (this log feature is newly added in version 3.8.0).
With help of the logs you can hopefully establish why certain large folders/files that you know exist, are not included in the scan. Please share the results if you think there is anything that can be improved.
Consider first viewing the logs without enabling full logging (i.e. do not provide the
-logAll YESoption) as this generates fewer messages, so you are less likely to overlook important/relevant log messages. However, enable full logging if you think that may be helpful.I agree that the "symlink" detail does not explain the main problem.
However, I want to clarify the symlink detail. I believe that GrandPerspective does not see any symlinks when it scans the file server volume. The client mounts a Samba share of the file server volume. The symlinks are only in the server's underlying file system. The Samba Samba software reads these symlinks, and presents them to the client as if they were directories which are identical to the symlink's target. It does not present symlinks to the client.
Therefore, in this test, GrandPerspective is not reading symlinks. It is reading simulated directories (and maybe files) constructed by the Samba server software.
Thank you for the pointer to the logging capability of GrandPerspective 3.8.0. Very helpful!
I used Howard Oakley's Ulbow app (https://eclecticlight.co/consolation-t2m2-and-log-utilities/) instead of the macOS
logcommand, but it gives the same result. The log messages mark the path names as<private>, even when running GrandPerspective with--args -logAll YES, so I followed Oakley's instructions at https://eclecticlight.co/2023/03/08/removing-privacy-censorship-from-the-log/ to reveal them.The log messages seem to say that GrandPerspective thinks that the missing directories do not exist. There are log messages of the form:
Interestingly, when I ask GrandPerspective to scan /Volumes/VolName/dirname/tmp directly, it is able to read that directory. In some cases it fails to read subdirectories of the scanned directory.
It will take me a little more work to look at the rejected directories and figure out what they have in common that might cause GrandPerspective to reject them.
Here is the redacted log from running GrandPerspective on /Volumes/VolName/dirname:
Thanks for sharing the extra detail.
Just to check, when invoking GrandPerspective with
--args -logAll YESdo you not even see the path names in theScanning <path>messages? If so, that is not supposed to happen. This is what the expected behavior is:So most messages are still censored, but the most detailed ones not. However, if you want to view fully uncensored logs, then you need to indeed install a profile as you did.
Once you manage to identify why GrandPerspective cannot read certain content, please let me know. Is it due to permissions, or does the path it tries to read differ from the actual path name, or something else? As long as I cannot reproduce it locally, it is difficult to fix it.
I just performed an experiment:
Run Ulbow app to collect logs. Set Predicate to '(subsystem="net.sf.grandperspectiv")'. Checked the menu option "Get Debug" (which refers to debug-level messages). I did not install the module which removes censorship from log messages.
I then ran GrandPerspective 3.8.0 using this command:
open /Applications/GrandPerspective.app --args -logAll YESThe GrandPerspective app opened.
I scanned the directory
Documents/Pr/2026on my local computer which is the origin for the files on the file server. Ulbow revealed the following log messages:Then I scanned the directory
/Volumes/VolName/dirname/Projects/2026on my file server. This is backup of most but not all of the files inDocuments/Pr/2026. Ulbow revealed the following log messages:Note that GrandPerspective scanned many more folders on the local directory, and printed zero error messages about "No such file or directory".
Also, it seems there is a second issue: you expect that
Scanning <path>messages will have path information when GrandPerspective has--args -logAll YES, but I observe the messages have the path information censored.That is strange. The "Scanning <path>" messages are logged with a public modifier to a trusted logger that is disabled by default. That should prevent sensoring, and does so on my system. Maybe this is a limitation of your version of macOS (14.8), which is fairly old.</path>
Anyway, I will also the "Error reading directory <path>" messages to the trusted logger, as those are generally useful as well for diagnostics.</path>
What do the paths look like in the error messages? Do they look correct? Are they accessible from the terminal, for example using
ls -al <path>?I suspect the issue you are experiencing is specific to the Samba server software that is used. GrandPerspective's scanning logic uses the generic FTS API. There's one thing that may still be worth a try (but that requires a dedicated debug build). GrandPerspective scans with the
FTS_XDEVoption set, which prevents it from descending into directories that have a different device number than the file from which the descent began. Maybe disabling this option has an impact.