Page MenuHomeFreeBSD

Add "geom -t".
ClosedPublic

Authored by trasz on Sep 13 2018, 2:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 11 2024, 6:16 PM
Unknown Object (File)
Mar 11 2024, 6:13 PM
Unknown Object (File)
Mar 11 2024, 6:12 PM
Unknown Object (File)
Mar 8 2024, 3:10 AM
Unknown Object (File)
Jan 7 2024, 12:34 AM
Unknown Object (File)
Jan 7 2024, 12:34 AM
Unknown Object (File)
Jan 4 2024, 6:31 AM
Unknown Object (File)
Dec 17 2023, 2:07 AM
Subscribers

Details

Summary

Add the "-t" option to geom(8) utility, to display geoms hierarchy.
Sample output:

% geom -t
Geom             Class      Provider
da0              DISK       da0
  da0            PART       da0s1
    da0s1        PART       da0s1a
      ffs.da0s1a VFS
      da0s1a     DEV
    da0s1        DEV
  da0            DEV
da1              DISK       da1
  swap           SWAP
  da1            DEV
cd0              DISK       cd0
  cd0            DEV

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz edited the summary of this revision. (Show Details)

What does this do that
sysctl -n kern.geom.conftxt
doesn't do?
Seems like this is just filtered information from that data source.
At the very least, a pointer to that information should be given since it's so much easier to use in scripts than this output.

It displays the information in a way that's easy for a human to comprehend in a glance, showing "what's connected to what", ie the hierarchy. The kern.geom.conftxt sysctl doesn't contain that information. You can fetch that from kern.geom.confxml, but it requires some work.

(And the scripting should now be much easier due to -p, which makes it easy to "walk up the hierarchy" from any device node to the physical disks.)

This revision is now accepted and ready to land.Sep 14 2018, 10:43 AM
This revision was automatically updated to reflect the committed changes.
head/sbin/geom/core/geom.8
117

Shouldn't it be geom's or maybe even something like .Nm Ns 's?

head/sbin/geom/core/geom.8
117

It's supposed to mean "hierarchy of geoms" and not "GEOM subsystem's hierarchy".