Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pkginst(1M)

inst(1M)

bom(4)



SPACE(1M-SysV)      RISC/os Reference Manual       SPACE(1M-SysV)



NAME
     space - determine whether a package will fit

SYNOPSIS
     space [ -d ] [ -m margin ] sizefile ...

DESCRIPTION
     space is a part of the MIPS software package installation
     process. It is used to positively determine whether or not
     there is enough space on the target system to accommodate
     the complete installation of a software package or subpack-
     age, before any files in the package are installed. This
     helps to avoid situations where an install might fail after
     partial completion due to running out of disk space.

     Usually, space is invoked automatically by the installation
     scripts.

     In order to make its determination, space reads a set of
     sizefiles, which contain a list of all of the files in the
     package to be installed.  These files are generated by the
     mksizes program during software packaging based on the bom-
     files for the packages.  They contains records in the fol-
     lowing format:

         path size

     path is the pathname of the file, exactly as it appears in
     the bomfile.  size gives the size of the file in bytes.

     space stats each file named in the size files to determine
     whether a file with the path already exists on the target
     system. If so, the space occupied by the file is credited to
     the pool of space available for the installation, since the
     file will be overwritten when the new file is installed. It
     also credits the availability of the inode for the file. The
     amount of space which will be required by the file from the
     package to be installed is debited, along with the require-
     ment for an inode.

     For existing directories, no data blocks are ever credited,
     i.e., it is not assumed than any space occupied by existing
     driectories is due to files which are included in the pack-
     age. This conservative approach is used, since it is con-
     sidered better for space to return false ``not enough
     space'' determinations rather than false ``enough space''
     determinations in marginal situations.

     No foreknowledge about the local configuration with respect
     to disk partitioning and mount points is assumed.  space
     maintains the accounting of space debited and credited for
     each filesystem that would receive files from the



                         Printed 1/15/91                   Page 1





SPACE(1M-SysV)      RISC/os Reference Manual       SPACE(1M-SysV)



     installation. To do this, space notes the device on which an
     existing file to be overwritten resides. If the a file with
     the given path does not already exist on the system, a file
     is created with that pathname, and then stat'ed to determine
     where it would reside. These files are then deleted along
     with any intermediate directories which had to be created in
     the process.

     When space has read the entire set of sizefiles, it will
     have built a table with entries for each filesystem that
     would hold files from the installation. Each of these
     entries contains the total number of blocks and inodes
     required by the package to be installed, the total number of
     blocks and inodes that would be freed by virtue of existing
     files being replaced by files from the release to be
     installed, and the current number of free blocks and inodes
     on the filesystem. With this information, it makes a deter-
     mination of whether there is enough space on the system to
     proceed with the installation.

     space exits with a ``true'' (0) exit status if it has deter-
     mined if there is enough space. If there is not, it exits
     with a ``false'' (1) exit status and prints one or more mes-
     sages identifying the filesystems which do not have enough
     space, along with the size of the shortfalls.

     The -d option causes space to print the information in its
     size accounting tables before termination. For each filesys-
     tem involved, it gives the device name (labeled ``device''),
     the present number of free blocks (``bfree''), the present
     number of free inodes (``ifree''), the number of blocks
     required for installation (``breq''), the number of inodes
     required for installation (``ireq''), and the number of
     blocks and inodes credited due to files that would be
     overwritten (``bcred'' and ``icred'').

     The -m margin option requests that space include a ``safety
     margin'' when making its determination.  margin is a float-
     ing point number expressing the percentage of the overall
     requirement to use as the margin. The margin is applied to
     both the data block and inode requirements. Some margin (3%)
     is usually included when space is invoked by the install
     scripts.

SEE ALSO
     pkginst(1M), inst(1M).
     bom(4) in the Programmer's Reference Manual.








 Page 2                  Printed 1/15/91



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026