------------------------------- Page    i -------------------------------

                 UTS Disk Space Expansion and Shuffling




                                                 February 16, 1981

------------------------------- Page   ii -------------------------------

                            TABLE OF CONTENTS


1.    Introduction  . . . . . . . . . . . . . . . . . . . . . . . . .   1

2.    Preliminary Work  . . . . . . . . . . . . . . . . . . . . . . .   1

3.    Two Types of Transfers  . . . . . . . . . . . . . . . . . . . .   1

4.    Coordination with VM Directory Personnel  . . . . . . . . . . .   2

5.    Selecting a Specific Time and Date  . . . . . . . . . . . . . .   2

6.    Tape Backups. . . . . . . . . . . . . . . . . . . . . . . . . .   3

7.    Performing the Expansion and Shuffling  . . . . . . . . . . . .   3

8.    Cleanup Work  . . . . . . . . . . . . . . . . . . . . . . . . .   3

9.    Arrangement of Minidisks on a Pack  . . . . . . . . . . . . . .   3

Appendix A.    Expansion Procedure Example  . . . . . . . . . . . . .   5

Appendix B.    Shuffling Procedure Example  . . . . . . . . . . . . .   6


                                                            Last Page   6

-------------------------------- Page  1 --------------------------------

1.    INTRODUCTION

The UTS  operating system  consists of  several mountable  file  systems.
Each of these file  systems is a  distinct VM minidisk.  Groups of  these
minidisks comprise entire disk  packs.  Theoretically, non-UTS  minidisks
may also reside on packs containing primarily UTS minidisks.

At regular but infrequent intervals,  users on a  given file system  will
fill up nearly all the  space on it.  Often prudent cleaning can  reclaim
enough space on  the disk.   In other cases,  more disk  space is  simply
required.  At that  time, a  disk space expansion  effort must be  begun.
Such expansions may also require the shuffling of other minidisks, albeit
only physically,  on the  disk pack.   This document  discusses how  such
expansions and shufflings are performed.




2.    PRELIMINARY WORK

The UTS Support Staff member doing  the shuffling must ascertain all  UTS
packs and the actual cylinder addresses of all minidisks on  those packs.
Determination of packs for all UTS minidisks  can be done by executing  a
"q dasd" CP command or by checking with VM directory  maintenance person-
nel.  UTS minidisks not owned by the UTS id but linked and written by UTS
must be included.  The files "/etc/reconfig.cp", "/etc/unconfig.cp",  and
"/etc/rc" contain information about the owners and addresses of all disks
written to by UTS.  Actual cylinder addresses on the packs  for the mini-
disks can only be determined by checking with VM directory personnel.

At this point, the UTS Support Staff member  must put together a plan  of
the steps for the expansion,  taking into account available space on  the
packs and possible use of space on a temporary pack.  Expansion of an UTS
file system may require the shuffling of other UTS file systems to obtain
enough contiguous space on a pack  for the expanded minidisk.  All  these
factors must be included in one master plan of the work to be performed.




3.    TWO TYPES OF TRANSFERS

There are two types of transfers:  shuffles and expansions.  Shuffles are
the copying of a  minidisk from one  physical location to another of  the
same exact size.  Expansions are the copying of a minidisk to a  physical
location of greater size than the original space.

-------------------------------- Page  2 --------------------------------

The former activity, shuffling, can  be done via the /etc/bigcp  command.
This simple method,  detailed in  Appendix B, can  be done quickly.   The
latter, expanding, requires formatting the new blank space, making a file
system on it, and copying the data over.  This effort is more complicated
and takes significantly longer.  It is detailed in Appendix A.




4.    COORDINATION WITH VM DIRECTORY PERSONNEL

The UTS Support Staff member  doing the disk  space work must  coordinate
his efforts with VM directory personnel.  Only they can modify the actual
physical locations and sizes of the UTS minidisks.  This allocation  (and
deallocation) is a critical part of the expansion effort.

A typical expansion and shuffling  plan requires moving UTS minidisks  to
temporary locations during the movement.  This implies VM directory  per-
sonnel must  redefine minidisks  more than  once during  the work.   This
should not be a problem but the plan for it and the order of redefinition
of certain disks must be carefully worked out beforehand.




5.    SELECTING A SPECIFIC TIME AND DATE

The UTS Support Staff must  set a time for  the expansion and  shuffling.
The UTS system need not always be taken down but most probably some mini-
disks would have to be  unmounted.  Often, the  system is simply  brought
down.

Evenings (or weekends) are a  good time to  perform shufflings.  In  case
there is any  trouble caused  by the movements,  there is  a lot of  time
(until early the next weekday  morning) to try  to salvage the  situation
and reconstruct bad  disks or  restore lost files.   In practice, it  has
proven very easy for problems to occur, even if the shuffling  procedures
are followed correctly as these are very volatile moves.

The down time and expected duration of the system's unavailability should
be planned  and  advertised  in advance  to  allow users  to  plan  their
schedules accordingly, thus reducing inconvenience.

-------------------------------- Page  3 --------------------------------

6.    TAPE BACKUPS.

A rule that should always be followed in  disk shufflings is that a  com-
pleted backup of the system should be written onto tape  before the shuf-
fling is to begin.  It is wise if one can utilize these backups, possibly
performing them earlier in  the evening.  Regardless, some backup  should
be done before the shuffling begins.  If the  backups are not to be  done
onto the tapes for the usual nightly backups, other tapes should be used.
Problems with disk shuffling  can be  enormous and crucial  and a  system
backup provides insurance.




7.    PERFORMING THE EXPANSION AND SHUFFLING

The actual  expansions  and  shufflings tend  to  be  fairly  mechanical.
Nevertheless, problems  can  readily  occur  and the   member  should  be
prepared to do all he  can to keep the system  robust.  An example of  an
expansion is given in  Appendix A.  An  example of a shuffling effort  is
given in Appendix B.




8.    CLEANUP WORK

Some cleanup work should be done  after the shuffling.  One should  check
that the files tend  to appear where  they should be.  Additionally,  one
should modify "/etc/dsklist", "/etc/reconfig.cp", "/etc/unconfig.cp", and
"/etc/backlist" as necessary.




9.    ARRANGEMENT OF MINIDISKS ON A PACK

The simplest objective is to only shuffle and expand when necessary.   If
significant rearrangement is to be  done, heuristics can be used for  the
arrangement of minidisks on a  pack which can help  make the system  work
more efficiently.

The primary heuristic is to try to center the most important and  heavily
used file systems in the middle of a pack and  arrange the least used and

-------------------------------- Page  4 --------------------------------

those in which quick response time is  not as important, toward the  ends
of the pack.

One might also want to scatter the  heavily used file systems across  the
middle of several UTS packs  rather than collecting them all together  on
one pack.

-------------------------------- Page  5 --------------------------------

APPENDIX A.    EXPANSION PROCEDURE EXAMPLE

 1.  Logon to UTS.

 2.  Ipl UTS.
     ipl 220

 3.  Link to new disk as writable disk 440 (address 440).
     /etc/cpcmd link UTS 881 440 w blah

 4.  Format the new disk.
     /etc/format /dev/fdsk440

 5.  Make filesystem
     /etc/mkfs /dev/dsk440
     Mkfs reports the isize and fsize; remember this for later.

 6.  Mount the old disk read-only.
     /etc/mount /dev/dsk777 /from -r

 7.  Mount the new disk.
     /etc/mount /dev/dsk440 /to

 8.  Copy over all the stuff on the disk.
     /etc/cpt /from /to

 9.  Unmount the old disk.
     /etc/umount /dev/dsk777

10.  Update /etc/dsklist  with the  new isize  and fsize  as reported  by
     mkfs.

11.  Unmount the new disk.
     /etc/umount /dev/dsk440

12.  Detach the temporary disk 440.
     /etc/cpcmd det 440.

Note:  VM  directory personnel  work in  defining new  extents,  removing
minidisks, etc.  is necessary to establish the new disk as disk 777.

-------------------------------- Page  6 --------------------------------

APPENDIX B.    SHUFFLING PROCEDURE EXAMPLE



 1.  Umount the file system to be shuffled.
     /etc/umount /dev/dsk777

 2.  Link to the new disk as writable 440.
     /etc/cpcmd link uts 881 440 w blah

 3.  Copy the old disk to the new disk.
     /etc/bigcp /dev/fdsk777 /dev/fdsk4

 4.  Detach the old disk.
     /etc/cpcmd det 777

 5.  Have the VM directory personnel  remove the old minidisk  definition
     and change the virtual address of the new minidisk to the address of
     the old one.

 6.  Link to the shuffled minidisk.
     /etc/cpcmd link uts 777 777 w blah

 7.  Mount the shuffled disk.
     /etc/mount /dev/dsk777 /wherever

-------------------------------- The End --------------------------------
