Networker

Re: [Networker] What's wrong with this mminfo query?

2006-06-23 12:18:52
Subject: Re: [Networker] What's wrong with this mminfo query?
From: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 23 Jun 2006 11:14:55 -0500
In regard to: [Networker] What's wrong with this mminfo query?, Merill...:

Running this on 7.2.2 for UNIX...

mminfo -q 'pool=poolA,pool=poolB' -r 'volume,pool'

This seems to incorrectly query ALL pools. I did try this on one of my
Windows storage nodes (7.2.2 also) and the query worked.

I get the same results (all volumes reported) when running it on our 7.2.2
Linux server.  What has me surprised, though, is that it works for you on
your windows server.

Let me preface this by saying I've been using NetWorker for many years,
and sometimes one learns how things work with one version of a
product and doesn't always catch all the nuances as product features
change slightly over the years.  That is to say, my understanding of
what mminfo *should* be doing may not be 100% correct anymore, so take
the rest of this with a grain of salt.  ;-)

Maybe using pool=A,pool=B *should* work, but my experience with queries
was always that they were "AND" criteria, (i.e. the , serves the same
purpose that the AND serves in an SQL query), so I've always interpreted
a query like yours to mean

        give me all volumes that belong to pool=poolA AND pool=poolB

which clearly isn't possible (volumes only belong to one pool).  Of course,
using my rubric, the query should return no results, but instead it returns
all results (that seems like a bug to me).  That's the same if you try
something like

        -q volume=vol1,volume=vol2,volume=vol3

I don't think the mminfo man page ever spells it out, but it almost has
to be that the , means AND.  If it meant OR, doing stuff like

        mminfo -q 'pool=poolA,near,!manual' -r volume

would report on everything that matched any of the criteria (rather than
all of the criteria).

You could argue that when you have two contraints of the same type that
are adjoining, mminfo should treat the , as OR, but that could really add
complexity to a tool that's already probably pretty nasty under the hood.

About the only time I *ever* repeat a criteria in a query is for savetime,
and then only for time ranges that are bounded (i.e. newer than 06/01/06
but older than 06/15/06).  Otherwise, my rule of thumb is to not repeat
the same constraint twice in a query, as it just has never seemed to work
the way you would hope it would.

Hope this helps, and feel free to tell me how wrong I am and that my
product knowledge is completely outdated.  ;-)

Tim
--
Tim Mooney                              mooney AT dogbert.cc.ndsu.NoDak DOT edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Building              (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the
body of the email. Please write to networker-request AT listserv.temple DOT edu 
if you have any problems
wit this list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER