I tried this conversation once here or on c.u.s some time ago, and don't recall
getting a consensus,
so I think I'll try again.
I for one find it very annoying that there's no way to exclude from df output
all those filesystems
that do not represent real real storage (optionally together with excluding
those that do not
represent local storage, although excluding NFS and such can be done with df
-l).
I note that /etc/dfs/fstypes as delivered has the following entries:
nfs NFS Utilities
autofs AUTOFS Utilities
cachefs CACHEFS Utilities
Never mind that autofs and cachefs aren't strictly distributed filesystems in
the usual sense
of the word, and that it takes dummy /usr/lib/fs/{autofs|cachefs}/* commands to
make
this work quietly. So I wonder why they're there unless to ensure that those
are hidden by
df -l.
A way to get df to not show all the rest of the pseudo filesystems without
their own storage
would make the output a lot easier to read (esp. not showing lofs mounts, since
they tend
to be rather long and not format nicely). At present, that would be at least:
ctfs devfs fd lofs mntfs objfs proc
as well as the three previously mentioned. Note I did not mention tmpfs, nor
normal filesystems
mounted from /dev/lofi/*, since in some sense these have (possibly in the
latter case) local
storage that would be a finite resource.
I think the way to do this that would cause the least breakage would be to have
a new file
and a new option to not display filesystems corresponding to entries in that
file (which could
be used together with -l to suppress what either would suppress).
I'm open as to what the option and file should be. Clearly the absense of the
file should be
treated as if it were empty.
This would allow such pseudo filesystems to be added to the file as they were
created, rather than
listing only those filesystems with real storage, so that for example if vxfs
were installed, it
would be treated by df as having real storage.
Many but not all of these could be suppressed by having an option to ignore
filesystems with zero
blocks total, but that doesn't get ugliness such as lofs hidden. Of course,
some times one
_wants_ to see lofs, in case something on it runs out of space and one wants to
see what it
loops back from. But mostly, it's ugly in df output.
See how pretty my df output is without all that garbage (df -k -l output pruned
down):
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 22717516 19885904 2604437 89% /
swap 5354376 1232 5353144 1% /etc/svc/volatile
swap 5359560 6416 5353144 1% /tmp
swap 5353232 88 5353144 1% /var/run
paradox 7096320 2642349 4453833 38% /paradox
and how ugly it is with that mess:
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 22717516 19885906 2604435 89% /
/devices 0 0 0 0% /devices
ctfs 0 0 0 0% /system/contract
proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
swap 5353576 1232 5352344 1% /etc/svc/volatile
objfs 0 0 0 0% /system/object
/platform/sun4u-us3/lib/libc_psr/libc_psr_hwcap1.so.1 22717516 19885906 2604435
89% /platform/sun4u-us3/lib/libc_psr.so.1
/platform/sun4u-us3/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 22717516 19885906
2604435 89% /platform/sun4u-us3/lib/sparcv9/libc_psr.so.1
fd 0 0 0 0% /dev/fd
swap 5358760 6416 5352344 1% /tmp
swap 5352432 88 5352344 1% /var/run
paradox 7096320 2642349 4453833 38% /paradox
/opt/local 61947013 51315252 10012291 84% /usr/local
The latter is very distracting; the filesystems with 0 blocks and the lofs
mounts tell me nothing
I need to know for resource management or planning.
A better approach? I see that at least fd seems to support the "ignore"
option, which helps a little;
I wonder why that isn't in vfstab by default. I haven't tried the others yet
(although I could
perhaps just look at the code). If all the zero-block filesystems and lofs
supported "ignore",
that would be another solution that would require no new options or
configuration files, just
documenting the availability of that option for those who wanted cleaner df
output, and perhaps
defaulting it in vfstab, at least for the zero-block filesystems.
Of all of those, I think I really like the last one (add "ignore" option to
those filesystems) the
best, as it would allow site-configurable decluttering without introducing any
new (in the sense
of distinct) interfaces, and it also provides granularity down to the
individual mount. I think one
could split that into two or more separate cases: one (or more) to add the
"ignore" option, and
then separately debate the virtue of defaulting that ignore option in the
supplied vfstab.
Does anyone see my point about decluttering df, and maybe about the latter
approach being the
cleanest? If so, what would be the best strategy for RFEs/ARC cases: one, two,
or fully broken
out? More to the point, any _objections to that approach? If not, some day
soon I think I'll
write some patches to add the "iignore" option to those filesystems.
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code