1 02/28/85 sweep_pv
  2 
  3 Syntax as a command:  sweep_pv pvname {-control_args}
  4 
  5 
  6 Function:  performs utility functions that require walking through the
  7 VTOC of a mounted physical volume.  Among these functions are the
  8 listing of contents and unconnected VTOCEs, the deletion of such
  9 VTOCEs, and the evacuation of physical volumes (for logical volume
 10 compression).  The volume is processed in VTOC order.
 11 
 12 
 13 Arguments:
 14 pvname
 15    is the name of the mounted physical volume whose VTOC is to be
 16    walked through.
 17 
 18 
 19 Control arguments:
 20 -adopt
 21    attempts to reconstruct directory branches for VTOCEs encountering
 22    reverse connection failures.  Unique names are derived from the
 23    primary name in the VTOCE.  The -gc control argument must be given
 24    to use the -adopt control argument.  If the -dl control argument is
 25    given as well, VTOCEs that cannot be adopted are deleted.  The
 26    success or failure of adoptions is reported to the report produced
 27    by the -gc control argument.  For a description of the definition
 28    attributes provided for adopted branches, see the description of the
 29    adopt_seg command.  This request requires hc_backup_ access.
 30 -debug, -db
 31    is for system programmer use, and disables highly privileged calls
 32    in order to allow debugging of this program.
 33 
 34 
 35 -delete, -dl
 36    deletes unconnected VTOCEs.  This control argument is only allowed
 37    when the -gc control argument is specified.  Access to hphcs_ is
 38    required to use this control argument.  The collection report is
 39    modified to indicate that these VTOCEs were deleted.
 40 -force, -fc
 41    forces access to all directories that need to be scanned where
 42    status permission is lacking.  Status permission is necessary for
 43    all components of the pathnames of VTOCEs processed.  If this
 44    control argument is not used, or status permission is lacking and
 45    cannot be forced, an error is reported.
 46 -from first
 47    indicates the first VTOCE to be processed.  If first is not given,
 48    VTOCEs are processed starting at VTOC index 0.
 49 
 50 
 51 -gc
 52    performs garbage collection, i.e., all VTOCEs for which a reverse
 53    connection failure is encountered in resolving their pathnames are
 54    logged in a collection file.  This file is produced whether or not
 55    the -list control argument, above, is specified.  At the end of the
 56    collection file report, the total number of VTOCEs and records held
 57    by them in this state is printed.  Selected information, such as the
 58    name in the VTOCE and date/time used and modified, is also put in
 59    the report for each such VTOCE.  The collection file report is given
 60    a three-component name and is placed in the working directory.  The
 61    three-component name has "pvgc" as the first component, the physical
 62    volume name as the second, and the time the segment is created as
 63    the third component (e.g., pvgc.public.0814).
 64 
 65 
 66 -list
 67    creates a listing file containing the VTOC index, time listed, and
 68    pathname of every segment on the volume at the time its VTOCE is
 69    scanned.  An asterisk on the line of the listing for a particular
 70    VTOCE indicates a reverse connection failure (i.e., no branch exists
 71    for the entry).  For nondirectory segments, the page fault meter of
 72    the segment is given.  The convention for listing incomplete
 73    pathnames is the same as that used by the vtoc_pathname command (see
 74    the vtoc_pathname description in the Multics Commands and Active
 75    Functions manual, Order No.  AG92).  The listing file is given a
 76    three-component name and is placed in the working directory.  The
 77    three-component name has "pvlist" as the first component, the
 78    physical volume name as the second, and the time the segment is
 79    created as the third component (e.g., pvlist.public.0749).
 80 
 81 
 82 -move, -mv
 83    moves all segments corresponding to VTOCEs processed off this volume
 84    onto another physical volume of the same logical volume.  Segments
 85    that suffer reverse connection failures are not moved.  If segments
 86    are moved for some purpose other than evacuation, the inhibit_pv
 87    command should be invoked with the -off control argument after
 88    moving has taken place.  The sweep_pv command attempts to target
 89    segment moves to the physical volume in the logical volume with the
 90    most page space available by inhibiting and disinhibiting volumes
 91    dynamically; all volumes except the volume being evacuated are
 92    disinhibited when the sweep_pv command is exited.  Volumes found to
 93    be inhibited at the time the command is invoked are not
 94    disinhibited; this facilitates simultaneous evacuation of volumes.
 95    Any volume that is completely evacuated by this means should be
 96    deregistered before the logical volume is reaccepted.  Access to the
 97    hphcs_ gate is required to use this control argument.  (See the
 98    Multics System Maintenance Procedures manual, Order No.  AM81, for
 99    more details.)
100 
101 
102 -only vtocx
103    processes only the single VTOCE whose octal index is vtocx.
104 -to last
105    indicates last VTOCE to be processed.  If last is not given,
106    processing proceeds to the end of the VTOC.
107 
108 
109 Access required:  The sweep_pv command requires phcs_ access, access to
110 hc_backup_ if the -adopt control argument is used, and access to hphcs_
111 if the -delete or -move control arguments are used.
112 
113 
114 Notes:  Any errors encountered during the VTOC sweep are reported to a
115 file that is given a three-component name and placed in the working
116 directory.  The three-component name has "pvef" as the first component,
117 the physical volume name as the second, and the time the segment is
118 created as the third component (e.g., pvef.public.1321).  Errors in
119 command usage, such as specifying a nonexistent or unmounted physical
120 volume, are reported to the bootload console.
121 
122 When sweep_pv is invoked with the -move control argument, it first
123 inhibits segment creation on the volume being vacated, and then vacates
124 the pack.  When sweep_pv terminates, it leaves the volume inhibited and
125 prints a message to this effect.  The volume can be uninhibited
126 manually by means of the inhibit_pv command.