From: Robert N. <ro...@th...> - 2006-06-22 20:10:27
|
Having just gone through porting mtx to Windows I feel I'm pretty close to an "expert" on it :-). If there is anything you want to know, or you need any help, let me know. > -----Original Message----- > From: bac...@li... > [mailto:bac...@li...] On Behalf > Of Arno Lehmann > Sent: Thursday, June 22, 2006 12:34 PM > To: bacula-devel > Subject: [Bacula-devel] .commands was: "Re-Run Missed Levels" > withsplit storage... > > Hello, > > On 6/22/2006 3:44 PM, Kern Sibbald wrote: > ... > > OK, could you please re-work this a bit with the following in mind: > > > > All Bacula commands are of the form verb keyword=value, ... > > > > with the exception that "verb" can be replaced by a "noun" > and in that case, > > it means tell me the name of all the "noun" items. > > Erm. Sorry. Good point. I actually didn't notice that, but > that might be > because english is not my native language and I tend to think about > Bacula commands simply as bacula commands, not of a natural > language... > > > So: > > > > .storage > > > > means list all the storage devices. > > > > and > > > > .volume (does not exist) > > > > would mean list all the volumes. > > > > If you want to update a volume, we can either have: > > > > .update volume=xxx > > > > where the update command (verb) knows that we are dealing > with volumes because > > it is the first keyword, OR if someone does not like that, > we could have: > > > > .updatevol ... > > > > I prefer simply .update > > So do I. > > > If you want the devices attached to a Storage device, first > you have to > > specify whether or not we are talking about the Director's > concept or the > > what is known from the SD. Let's assume you want what the > Director knows. > > That's the right assumption. I don't feel I want to talk the > SD as long > as there is a DIR. > > > We might have something like: > > > > .show storage=xxx > > or > > .show storage > > > > for all. > > > > Using the .show command sticks with the current Bacula > console usage, which I > > think will minimize our confusion later. > > That's worth something... > > > > >>Anyway, the things I'd like to see most are: > >> > >>.volume name=xxx|id=xxx > >>enabled|enable|disable|status=xxx|getstatus|getlocation|location=xxx > >> > >>This would be more or less what I need for the Volume > Location Management. > >> > >>.storage doesn't take arguments today. It should allow a > listing of the > >>devices attached to each storage, like '.storage storage=xxx' > > > > > > See above. > > Ok, so this would be > .update volume=xxx > > >>.device device=xxx > > > > > > This would be ".show device=xxx" > > Agreed. > > > > > > >>to display a short status of a device, for example > >>empty > >>idle > >>busy > >>waiting > > > > > > Look at the current output of "show device" to get an idea > of what would be > > printed. > > Damn. I never knew about the 'show device' command... time to > read the > manual once more! One minute later: The 'device' noun is not in the > manual section... I'll prepare a patch for that, if I get cvs to work > how I want it to. > > I guess 'show device' gives me most of what I want except it doesn't > tell me about the relationship between. But then, it's rather > well parsable. > > > > >>These commands - or something with similar effect - would > be used in a > >>part of the Volume Location Management where I try to > unload tapes that > >>are part of a volume set to be taken off-site. > >> > >>Finally, a set of commands to move tapes through Bacula inside an > >>autochanger - like > >>.device device=xxx unmount > >>.storage device=xxx toslot=yyy unload > >>.storage fromslot=xxx toslot=yyy move [templslot=zzz] > > > > > > The above needs to be reworked in the light of what I said. > > Right. Anyway, > > > Moving tapes from slot to slot is not something that will > come soon unless > > someone wants to do some design work on mtx-changer to add > the needed > > functionality. In addition, not all autochangers will > permit you to unload > > into a different slot or to move from one slot to another. > Someone will need > > to research that and find out how to determine if it is > permitted or not so > > that Bacula can reject any illegal command before it destroys the > > autochanger ... > > Well, I managed to create a script that does what I want, but > it needs > lots of hints from the user. (And, in case the autochanger can't do > transfers, it needs an empty slot.) As far as I know, 'mtx transfer' > should not be able to damage an autochanger. See the > following example > output, run against a device without transfer capabilities: > > mtx -f /dev/sg4 transfer 4 3 > mtx: Request Sense: Long Report=yes > mtx: Request Sense: Valid Residual=no > mtx: Request Sense: Error Code=70 (Current) > mtx: Request Sense: Sense Key=Illegal Request > mtx: Request Sense: FileMark=no > mtx: Request Sense: EOM=no > mtx: Request Sense: ILI=no > mtx: Request Sense: Additional Sense Code = 24 > mtx: Request Sense: Additional Sense Qualifier = 00 > mtx: Request Sense: Field in Error = 07 > mtx: Request Sense: BPV=yes > mtx: Request Sense: Error in CDB=yes > mtx: Request Sense: SKSV=yes > mtx: Request Sense: Field Pointer = 02 00 > MOVE MEDIUM from Element Address 5 to 4 Failed > > Anyway, this is not something I will work on very soon, > neither will I > need it. Modifying mtx-changer should be possible, but > incorporating the > same functions into chio-changer is not something I can do - I don't > have a FreeBSD system with attached autochanger. > > Back to my suggestions for new commands (you fixed most of > them, I think :-) > > .update volume [enabled|disabled|*see below] > .show device=xxx lists information from one storage device, including > devices (I'm not even sure that information exists in the DIR...) > .move eject device=xxx mostly the same as 'unmount xxx' but > perhaps with > better machine-readable output like "Ok" or "Error busy" > .move eject device=xxx toslot=yyy the same as above, but with a new > target slot. The catalog should be updated accordingly. > .move transfer device=xxx fromslot=yyy toslot=zzz > > The .move commands should be understood as a long-term > feature suggestion. > > * comments for .update: Most of the volume attributes could > be updated > like this, for example .update volume=xxx slot=yyy but I don't think > this needs to be implemented. First, the function itself is already > there and can be used by scripts. Second, updating Enabled-Status > through the user interface should not be necessary because a) > the reason > that attribute exists is an external addition which does not > yet exist, > and b) it is intended as an intermediate state which will be reset > automatically, so nothing a user usually needs to do. > > Arno > > -- > IT-Service Lehmann al...@it... > Arno Lehmann http://www.its-lehmann.de > > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > dat=121642 > _______________________________________________ > Bacula-devel mailing list > Bac...@li... > https://lists.sourceforge.net/lists/listinfo/bacula-devel > |