Bug 169647

Summary: gmultipath(8) fails to detect missing module
Product: Base System Reporter: Florian Heigl <fh>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: asomers, trasz
Priority: Normal    
Version: 9.0-RELEASE   
Hardware: Any   
OS: Any   

Description Florian Heigl 2012-07-04 16:30:04 UTC
If you don't have the geom_multipath module loaded, gmultipath list -a (and all other options) will report an error that the command is not available.

# gmultipath list -a
gmultipath: Command 'list' not available.
# gmultipath status
gmultipath: Command 'status' not available.


Once loading the module the commands will magically start to work.

I would beg you for a more useful error handling.
Yes, I know there might be some corner-cased reason since geom is a framework and so the command is in fact not available without the module.
Do not want.

gmultipath list should either return an empty list or an actual error (module not loaded!) here.


I would like to add gmultipath monitoring to our software (and by that, to nagios), but it's almost impossible with unreliable output like this.


I can't workaround this using kldstat, since it might be in-kernel, not a module.
How can I ask geom if it has multipathing features running?

I filed this as a medium bug since multipathing is amongst the most critical parts of an OS (many times more important than raid, since critical data will not be on a local raid...) and there needs to be a reliable means of querying it.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:36 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Alan Somers freebsd_committer 2021-06-23 19:59:36 UTC
Fixed in SVN r338589 by trasz.  Now the error looks like this.

> gmultipath list
gmultipath: Command 'list' not available; try 'load' first.