

hard disk             Technical Information             hard disk




The hard disk is the  primary means of storing and accessing data
under the COHERENT  system.  This article introduces some aspects
of the  COHERENT system that affect the care  and feeding of your
hard disk.

***** Device Drivers *****

The  COHERENT system  comes  with two  sets of  drivers for  hard
disks:  the aatt  drivers, for  AT-style hard  disks; and  the ssccssii
drivers, for the SCSI family of hard disks.  See their respective
articles in the Lexicon for details.

***** Partitioning *****

The COHERENT  command ffddiisskk  displays information about  how your
hard  disk  is currently  configured.   You can  also  use it  to
repartition your hard disk and reassign partitions from MS-DOS to
COHERENT, or vice versa.

Note that  this is an extremely powerful  command, with which you
can create  much mayhem on your system.   Like any powerful tool,
it should be treated carefully and with respect.  See the article
on ffddiisskk in the Lexicon for details on how to use this command.

Partitioning your  hard drive can be  an uncomplicated procedure.
We offer  these guidelines in an  effort to make it  as simple as
possible.   Before attempting any  partitioning you  should first
back-up all the data currently on your hard drive.  If you do not
do this  you risk losing data permanently.   You should also know
the  correct  physical  parameters  of  your  hard  drive.   This
information can  be obtained  from your machine  documentation or
from  the drive  manufacturer.  It  is  best not  to rely  on the
parameters  given   in  the   BIOS:  these  may   be  translation
parameters.

If your drive is formatted for MS-DOS, it is advisable to run MS-
DOS ffddiisskk  before you  start to  install COHERENT.  If  the whole
drive is taken up by DOS partitions, you must use MS-DOS ffddiisskk to
create a non-DOS area on the drive.  It is not sufficient to have
an empty  MS-DOS logical drive set  aside for COHERENT.  COHERENT
does not recognise MS-DOS  logical drives, it only sees the whole
partition.  In  the following diagram,  the top column  shows the
way MS-DOS ffddiisskk sees your  drive, and lower the column shows the
way COHERENT ffddiisskk sees your drive:


        Z-------------------------?
        |    DOS Root Partition   |
        C-------------------------4
        |  DOS Extended Partition |
        |  C-------------------4  |
        |  |  Logical Drive 1  |  |
        |  C-------------------4  |
        |  |  Logical Drive 2  |  |


COHERENT Lexicon                                           Page 1




hard disk             Technical Information             hard disk



        |  C-------------------4  |
        |  |  Logical Drive 3  |  |
        |  @-------------------Y  |
        @-------------------------4



        Z--------------------------?
        |     DOS Root Partition   |
        C--------------------------4
        |                          |
        |                          |
        |                          |
        |                          |
        |  DOS Extended Partition  |
        |                          |
        |                          |
        |                          |
        @--------------------------4


If you  use COHERENT ffddiisskk to repartition  MS-DOS space, you risk
causing MS-DOS  ffddiisskk to hang.  One further  word of warning.  If
you have an automated disk formatting and partitioning utility on
your  MS-DOS partition  such as  Disk  Manager or  Speedstor, you
should operate it in ``manual'' mode, not in ``automatic''.

Some hard  drives have more  than 1,024 cylinders.   COHERENT can
only recognise a drive up to  this limit.  You may have a utility
such  as Speedstor  that allows  you  to place  MS-DOS partitions
beyond that  boundary.  COHERENT  will not see  those partitions,
but you can still  access them as usual through MS-DOS.  However,
when partitioning  a drive with more than  1,024 cylinders, it is
necessary to follow the following principles:

11.   Run  the partitioning  utility before  you start  to install
     COHERENT.  You should  create a non-DOS partition that falls
     completely  within the  1,022-cylinder boundary.   Your next
     MS-DOS  partition should  start no  sooner than  the 1,026th
     cylinder.

***** Adding a COHERENT Partition *****

The following  describes how to  add a new  COHERENT partition on
your hard disk.

During  your initial installation  of COHERENT,  the installation
program  handled the  details  of preparing  your  hard disk  for
COHERENT.  Adding  a partition after  the system is  installed is
not difficult, but  it requires that you understand the operation
of the  following commands:  bbaaddssccaann, cchhmmoodd, cchhoowwnn,  ffddiisskk, ffsscckk,
mmkkffss  and  mmoouunntt. See  the  Lexicon articles  for  each of  these
commands  for  further information  before  attempting  to add  a
partition.



COHERENT Lexicon                                           Page 2




hard disk             Technical Information             hard disk



In  general, the  following steps  are  required when  creating a
partition for  use by  COHERENT.  Please  note that you  must not
change the  size of your  existing root partition, or  you may no
longer be able to boot COHERENT from the hard disk.

11. Completely back up all  partitions on your hard disk.  Be sure
   to  back  up the  COHERENT  partitions, as  well  as any  non-
   COHERENT partitions (e.g.,  those for MS-DOS or OS/2).  Verify
   that your backups are _r_e_a_d_a_b_l_e and _c_o_r_r_e_c_t.

22. Log in  as the superuser  rroooott. Make sure all  other users are
   off the  system; then  invoke the command  /eettcc/sshhuuttddoowwnn. This
   shuts  down COHERENT  and  returns the  system to  single-user
   mode.  Type the command ssyynncc to flush all buffers.

33. Invoke  the  COHERENT  command  ffddiisskk  and  add  the  COHERENT
   partition to your disk,  as described above.  Be sure to write
   down the device name associated with your new partition (e.g.,
   /ddeevv/aatt00cc) and its size.

44. The command bbaaddssccaann checks the device for bad blocks.  If your
   partition resides on  a non-SCSI device (e.g., MFM, RLL, ESDI,
   or IDE), run the command bbaaddssccaann as follows:

           /etc/badscan -v -o /conf/proto._d_e_v_i_c_e _r_a_w__d_e_v_i_c_e _x_d_e_v_i_c_e

   where _d_e_v_i_c_e specifies the four-character block-special device
   name for  the partition (e.g.,  aatt00cc), _r_a_w__d_e_v_i_c_e is  the full
   device path  name for the  character-special device associated
   with the  partition (e.g., /ddeevv/rraatt00cc),  and _x_d_e_v_i_c_e specifies
   the   partition-table  device  for   the  disk   drive  (e.g.,
   /ddeevv/aatt00xx).

55. Invoke the  command mmkkffss to  create a COHERENT  file system on
   the new partition, as follows:

           /etc/mkfs /dev/_d_e_v_i_c_e /conf/proto._d_e_v_i_c_e

   This invocation  will cause  mmkkffss to  use the contents  of the
   ``proto''  file  that   bbaaddssccaann  created  when  it  built  the
   _b_a_d__b_l_o_c_k list for the new partition.

66. If need be, use command mmkkddiirr  to create a directory to use as
   a _m_o_u_n_t  _p_o_i_n_t for the  newly created file  system.  The mount
   point is the directory onto which this directory's file system
   will be  appended.  Usually,  this directory is  located under
   `/', also called  the _r_o_o_t _d_i_r_e_c_t_o_r_y.  You can, however, mount
   a file system onto  any directory that already exists.  If you
   create a new directory  (e.g., /ww or /mmyyddiirr), use the commands
   cchhoowwnn and  cchhmmoodd to set an appropriate  ownership and mode for
   for the directory.

77. Edit the  file /eettcc/mmoouunntt.aallll and add a  line of the following
   form:



COHERENT Lexicon                                           Page 3




hard disk             Technical Information             hard disk



           /etc/mount _d_e_v_i_c_e /_m_o_u_n_t__p_o_i_n_t

   where  _d_e_v_i_c_e  is  the  full  path  name of  the  device  that
   specifies   your   new   partition  (e.g.,   /ddeevv/aatt00cc),   and
   _m_o_u_n_t__p_o_i_n_t is  the name of the directory  that you created in
   the earlier step.

88. Finally, edit  the file  /eettcc/cchheecckklliisstt and add  the character
   special  device name  (e.g., /ddeevv/rraatt00cc)  of the  new COHERENT
   partition  to  it.    This  will  ensure  that  COHERENT  will
   automatically  run  ffsscckk   on  that  partition's  file  system
   whenever you boot the system.  This can be vital in recovering
   from a system crash.

***** Adding Another Hard Disk *****

If you wish to add another hard disk to your system, you may have
to run  some low-level routines that  are hardware specific.  See
the documentation that accompanies your hardware for details.

In brief, when you install  the hard disk, you must partition it,
as  you did  your  original hard  disk when  you first  installed
COHERENT.  If  you wish to add  non-COHERENT operating systems to
one or  more partitions,  do so first;  then add COHERENT  to the
remaining partitions, as described above.

***** Changing the Size of the Root Partition *****

Changing  the size  of your  rroooott file  system requires  that you
reinstall COHERENT.  It is  strongly advised that you back up _a_l_l
partitions  of your  system before  you attempt  to do  this.  In
addition,  to reduce  the time  involved  in restoring  your data
files,  make an  additional backup of  all directories  and files
that  have  changed form  your  original  MWC installation.   The
command ffiinndd will help you locate all such files; see its Lexicon
entry for details.

You should then follow  the directions given in the release notes
for installing  COHERENT.  Note that when  you attempt to install
COHERENT over  an existing COHERENT partition,  COHERENT will ask
you  if  you are  sure  you  know what  you're  doing before  the
installation  procedure   creates  a  new  file   system  on  the
partition.  Be sure to request that a new file system be created,
or the installation will fail.

After  installing the  COHERENT distribution  onto your  new root
partition, restore any data files and directories from the second
set of backups that you performed.

***** See Also *****

aatt,  bbaaddssccaann, cchhmmoodd, cchhoowwnn,  ffddiisskk, ffsscckk,  tteecchhnniiccaall iinnffoorrmmaattiioonn,
mmkkffss, mmoouunntt, ssccssii




COHERENT Lexicon                                           Page 4


