Table of Contents Previous Chapter Adding a disc drive.

Adding a disc drive.

7 Adding a disc drive.

There is never enough disk space. The minute a new disk is added to the system, it is half full, or so it seems. Getting users to clean up their disk space is as difficult as getting a teenage boy to clean up his room. Therefore, the system administrator will occasionally have to install new disk drives.

7.1 Disc drive terminology.

This diagram shows an idealized disc drive. Here is an example of how several file systems on three disc drives might be mounted.

7.2 Steps in adding a disc drive.

7.3 Commands for determining device names/numbers

7.4 Commands for partitioning/formatting drives

7.5 Commands for examining partition information

7.6 Example BSD partitioning.

BSD systems usually use 8 partitions (labelled "a" through "h")

Example Eagle disc partitions 
------------------------------------
Partition  Cylinders  Typical use     
------------------------------------
a          0-15       /               
b          16-86      Swap            
c          0-841      Entire disc     
d          391-407    Alternate Root  
e          408-727                    
f          728-841                    
g          391-841    /usr            
h          87-390                     
------------------------------------
There are several possible ways of creating file systems on these partitions. Here is a diagram of three alternatives.

7.7 Example System V partitioning.

System V systems number their partitions 0 through 7. (Example from IRIX system)

# prtvtoc c0t0d0s2
* c0t0d0s2 partition map
*
* Dimensions:
* 512 bytes/sector
* 84 sectors/track
* 15 tracks/cylinder
* 1260 sectors/cylinder
* 1658 cylinders
* 1656 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
 0 2 00 0 103320 103319 /
 1 3 01 103320 132300 235619
 2 5 00 0 2086560 2086559
 5 6 00 235620 1106280 1341899 /opt
 6 4 00 1341900 437220 1779119 /usr
 7 4 00 1779120 307440 2086559 /usr/openwin

7.8 The Berkeley /etc/disktab file.

Here is an example of an /etc/disktab file used here in C&C for Ultrix systems. The descriptions of the entries can be found in the man pages for disktab (see "man disktab").

7.9 The SunOS format.dat file.

SunOS uses a file called format.dat. This example is from the sun-managers email list.

7.10 /etc/fstab file (System V).

blck-spcl-file mnt-loc [fstype] [options]
/dev/root / efs rw,raw=/dev/rroot 0 0
/dev/usr /usr efs rw,raw=/dev/rusr 0 0

7.11 /etc/fstab file (4.3 BSD).

blck-spcl-file mnt-loc fstype opts dump-freq passno
/dev/sd0a / 4.3 rw,noquota,noauto 0 1

7.12 /etc/fstab file (ULTRIX).

blck-spcl-file:mnt-loc:type:dump-freq:passno:fstype:options
/dev/ra0a:/:rw:1:1:ufs::

7.13 Partitioning considerations

7.14 Remaking a disc partition

# umount /data
# dump 0ds 6250 24000 /dev/disk2g
# restore t
# newfs -b 16384 /dev/rdisk2g M2694ESA
# mount /data
# cd /data
# restore r

7.15 Example Problems and Reading

 
Table of Contents Next Chapter