You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use sysinfo as a means to enumerate the mountpoints of a system and figure out if a given filepath is tied to a volume/mountpoint with sufficient available capacity.
When running my code on macOS, I noticed that the root mountpoint is not enumerated by sysinfo, which seems like it stems from the change here: #714
I can understand the remarks made in the PR and the changed code, but it's not actually clear to me how one could actually resolve the magical link between, say, the /System/Volumes/Data partition that is obviously the backing for /. All attempts to do this even on the command line, with readlink and stat and mount, paint an incomplete picture.
On the flipside, simply removing the "is this a rootfs mount?" logic adds the / mountpoint to the disk output from sysinfo (and adds no other disks, in my case) which allows me to achieve my intended goal.
I guess my question would be: could the "is this a root filesystem?" logic be changed to be configurable? I'm still trying to figure out if there's a reasonable cross-platform way to go from /some/arbitrary/path and get the "true" mountpoint (i.e. /) but save for that, having sysinfo return the / mountpoint feels more inline with what my intuition as a user would be.
Additionally, in terms of supporting evidence: mount on macOS returns both the /System/Volumes-prefixed mounts and the root (/) mount, and looking at Storage under the System Report shows the root mount and the data volume mount. So the fact that sysinfo doesn't show the root mount is more divergent than not, IMO.
The text was updated successfully, but these errors were encountered:
That seems reasonable to me. In general, I'm fine with experimenting a bunch here. I have some changes that should help with this in progress locally, so I'll try and put a PR with them soon 👍.
I'm trying to use
sysinfo
as a means to enumerate the mountpoints of a system and figure out if a given filepath is tied to a volume/mountpoint with sufficient available capacity.When running my code on macOS, I noticed that the root mountpoint is not enumerated by
sysinfo
, which seems like it stems from the change here: #714I can understand the remarks made in the PR and the changed code, but it's not actually clear to me how one could actually resolve the magical link between, say, the
/System/Volumes/Data
partition that is obviously the backing for/
. All attempts to do this even on the command line, withreadlink
andstat
andmount
, paint an incomplete picture.On the flipside, simply removing the "is this a rootfs mount?" logic adds the
/
mountpoint to the disk output fromsysinfo
(and adds no other disks, in my case) which allows me to achieve my intended goal.I guess my question would be: could the "is this a root filesystem?" logic be changed to be configurable? I'm still trying to figure out if there's a reasonable cross-platform way to go from
/some/arbitrary/path
and get the "true" mountpoint (i.e./
) but save for that, havingsysinfo
return the/
mountpoint feels more inline with what my intuition as a user would be.Additionally, in terms of supporting evidence:
mount
on macOS returns both the/System/Volumes
-prefixed mounts and the root (/
) mount, and looking atStorage
under theSystem Report
shows the root mount and the data volume mount. So the fact thatsysinfo
doesn't show the root mount is more divergent than not, IMO.The text was updated successfully, but these errors were encountered: