📄 cart_ctl.8.in
字号:
.TH CART_CTL 8 "2000 October 9" "Debian Project".SH NAMEcart_ctl \- perform operations on cartridges, e.g. moves.SH SYNOPSIS.B cart_ctl[ -ilmtefFr ] [ -P [ <location> ] ] \[ -s <serverconfigfile> ] \[ -c <changerconfigfile> ] \[ -d <changerdevice> ] [ -C <cartridges> ] \[ -S [ <slots> ] ] [ -D [ <drives> ] ] \[ -L [ <loadports> ] ] [ -b <blocksize> ] \[ -n <comment> ].SH DESCRIPTIONThis command performs operations on cartridges and maintainsthe cartridge location database. This command is especiallydesigned for moving cartridges around, serving as a wrapperfor those commands, that in fact fulfil this functionality.cart_ctl adds the maintenance of the locations and unifiesthe command interface. E.g. the counting of slots, loadbaysand drives always starts with 1 here. Several cartridges,slots, drives and loadbays can be supplied using numbers,dashes and commas to the respective option, e.g. -C 3-5,8 .The order is significant, e.g. -m -C 2-3,1 -S 5,4,3 willmove cartridge 2 to slot 5, 3 to 4 and 1 to slot 3. Thiscommand evaluates the serverside configuration file and readsanother file to configure the media changer driving commands.The path to this second configuration file must be given inthe server configuration file as parameterChanger-Configuration-File .See below under FILES for more details on this..PPWith option -m, one or more cartridges are moved to anotherlocation. The location must be specified with options -S forslots, -D for drives, -L for loadbays and -P for a freetextdescription, if the cartridge is placed outside of anycartridge handling system. Thus the administrator can storeany kind of text as reminder, where the tapes are. If thereare no slots supplied with option -S, free slots are lookedup and the cartridge(s) move there. The same applies for -L.If no drive is given with -D, the drive configured in theserver configuration file is used. The number of the drivecan be given, or the device name, but in the current versionjust -D is mostly suitable. If there is a tape in the drive,it will be unloaded to a free slot first. If occupied slotsor loadbays are given as targets, an error message is printedand the move is not performed. If there is no argument givenwith -P, the user is prompted to enter a line of text, thatis stored in the cartridge locations database. If severalcartridges are moved outside of a robot, the text given with-P will be stored for all of them. If moving to loadbays ispossible, moves to the outside will first have a loadport astarget and the maintainer is asked to take the tape out ofthis place to it's final destination. When moving tapes inand there are loadbays, the maintainer is asked to put thecartridge into a loadbay and the robot does the rest. Ifthere isn't yet any location stored for a cartridge, themaintainer is asked to perform the move manually, naming theorigin location `unknown'..PPOption -S can be used, if a location of a tape changes, butit should not be moved by any robot. So -S just inserts or replaces thenew location in the database. To specify the locations thesame options can be used like when moving with -m, see theprevious section for details..PPOption -l lists the locations of all cartridges. If -S isalso supplied, the contents of the slots are listed. A dashmeans, that the slot is empty. A question mark means, thatthere is a cartridge in this slot, but it is unknown, whichthat might be. A dash, followed by a question mark and anumber, all in braces, means, that the slot is empty, but thelocations database has the given cartridge number stored forthis slot, what means an inconsistency. Option -L togetherwith -l has the respective meaning for loadbays like -S forslots..PPOption -i makes an inventory of the slots specified with -S.That is, the cartridges in these slots are loaded to drive,the labels are read and evaluated. If the label is recognizedas valid for afbackup, the location database is updated. Thecartridge will be put back to the original slot afterwards..PPOption -t can be used to label the tapes in several slots.The label numbers must be given using option -C and the slotswith option -S. If the label numbers are not given, it isassumed, that the tapes should get the currently registerednumbers. If it cannot be determined, which cartridges are inthe given slots, this is an error. If the slots are not given,it is tried to determine them from the given cartridge numbers.If the given cartridges are currently not located in any slot,this is an error. Like with the command label_tape, a commentto be written to tape can be supplied with option -n. Ifoption -r is not given, the user will be asked, whether thelabeled cartridges should be marked overwritable. To achievethis without further asking the option -r must be given..PPOption -e makes the tape in the drive to be ejected to a freeslot. No tape number has to be supplied. Optionally the slotcan be specified using option -S..TP.B -boverride the blocksize setting in the serverconfiguration file (discouraged).TP.B -C <cartridges>specify the cartridge numbers to operate on.TP.B -c <config-file>use the given file to configure the media changerdriving commands.TP.B -D <drives>use the given drive as target for moves or locationsettings. The drive may be specified as numberinside a changer system (starting with 1) or asdevice name. If no drive is given, the driveconfigured in the server configuration file isused.TP.B -d <device>operate on the given media changer device, don'tuse the settings in the configuration file.TP.B -Fforce operations, ignore active locks on streamerand changer devices, if applicable.TP.B -fforce labeling operations without further asking.TP.B -iinventory the cartridges in the slots specifiedwith -S.TP.B -llist the cartridge locations, together with -S:list the contents of the slots (if no slots given:of all slots), together with -L: list the contentsof loadports (specified or all).TP.B -L <loadports>specify the loadports, that should be part of thedesired operation. If no loadports are given,free ones are searched for when moving.TP.B -mperform moves of one or more cartridges. Thesemust be given using -C. Targets for the movesmust be given using -S for slots, -L for loadbays,-D for drives or -P for somewhere else.TP.B -n <comment>use the given comment when labeling tapes with -t.TP.B -P <place>Specify the target place for moving or just settinga cartridge location. If no place is given on thecommand line, the program will prompt for one.TP.B -rTogether with option -t: delete the labeled cartridgesfrom the cartridge database without further asking, sothey will no longer be protected from overwriting.TP.B -S <slots>Specify the slots, that should be part of thedesired operation. If no slots are given,free ones are searched for when moving.TP.B -s <serverconfigfile>Use the given file as server configuration file, notthe default one.TP.B -tWrite labels (`tags') to the cartridges in the slotsspecified with -S.SH NOTESThis command can be used as the SetCartridgeCommand in theserver configuration. Option -F is required here, cause theserver itself is already holding a lock on the streamer device,thus this command needs not and should not attempt any furtherlocking. The entry in the server configuration file should looklike this: /path/to/cart_ctl -F -m -C %n -D.SH FILES.IP @serverlibdir@/@serverconf@Server configuration file.IP @serverlibdir@/changer.confThe media changer driver configuration..brA configuration file to specify the media changer commands mustbe given in the server configuration with parameter Changer-Configuration-File.brThis file must name the commands, that really perform the movesof the cartridges in a changer. A maximum if nine entries canbe given to specify, how to move a cartridge from or to a slot,a drive or a loadbay (3 x 3 = 9). These parameters all havenames of the form Move-<origin>-To-<target>-Command with originand target being one of slot, drive and loadport, e.g. Move-Slot-To-Drive-Command:.brIn these commands the following replacements are made: %d the streamer device i.e. drive %D the media changer device %n the origin (e.g. slot) number, if the command starts to count with 1 %m the origin number, if counting starts with 0 %N the target number, if counting starts with 1 %M the target number, if counting starts with 0.brCommands, that are not supported for whatever reason, shouldbe commented out in this configuration file.Two commands can be configured, that print the numbers of freeslots/loadports to standard output. If there are loadbays, thatshould be used, the command, that lists the free ones, must bepresent. The command listing the free slots must always bethere. The parameter names for these commands are:List-Empty-Slots-Command and List-Empty-Loadports-Command .In these commands only the pattern %D is replaced likeexplained above..brFor the most common changer driving commands (mtx, stc, chioand mover/sch),appropriate files are included into the distribution. They canbe used without any modifcation, just comment out the commands,your hardware does not support (e.g. moving from slot to slot)..IP @servervardir@Some internal state information of the server..IP @servervardir@/cartridge_locationsThe ASCII file containing the cartridge locations database.SH SEE ALSOafclientconfig(8), xafclientconfig(8), full_backup(8),incr_backup(8), afverify(8), afrestore(8), xafrestore(8),update_indexes(8), copy_tape(8), afclient.conf(8), afserver(8), afmserver(8),afserver.conf(8), label_tape(8), tar(1) .SH AUTHOR.B afbackup was written by Albert Fluegel (af@muc.de)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -