DIVVY(ADM) UNIX System V
Name
divvy - disk dividing utility
Syntax
divvy -b block_device -c character_device [-v virtual_drive]
[-p physical_drive] [-i ] [-m ] [-n]
Description
divvy divides an fdisk(ADM) partition into a number of
separate areas known as ``divisions''. A division is
identified by unique major and minor device numbers and can
be used for a filesystem, swap area, or for isolating bad
spots on the device.
With divvy you can:
⊕ Divide a disk or fdisk partition into separate devices.
⊕ Create new filesystems.
⊕ Change the size of filesystems.
⊕ Remove filesystems.
Options
Options to divvy are:
-b block_device
Major device number of block interface.
-c character_device
Major device number of character interface.
-v virtual_device
For dividing a virtual drive. The number of the virtual
drive (partition) to divide, where 0 is the first
partition, 1 is the second, and so on.
-p physical_drive
For dividing one of several physical disks that share the
same controller.
-i Installation only. Disk being divided will contain a root
filesystem on division 0. Only to be done from a non-
active partition, or the root floppy.
-m Disk being divided should be made into a number of
mountable filesystems.
-n Installation only; automatic option. Disk being
divided will contain the following:
root fileystem on division 0
swap on division 1
u fileystem on division 2
scratch on division 5
Usage
The device being divided must be a block device with a
character interface. For example, to use divvy on a device
with a block-interface major number 1 and character
interface number of 1, enter:
divvy -b 1 -c 1
The -v option specifies which virtual drive to divide. The
default is the active drive. Here, ``virtual drive'' is the
same as an MS-DOS partition. Virtual drive numbers are
determined with the fdisk(ADM) utility.
The -p option allows division of one of several physical
disks sharing a controller. divvy defaults to the first
physical device numbered ``0.'' To access a second physical
disk, use the -p 1 option.
The -i option is used during installation. It specifies the
device being divided will contain a root filesystem. With
this option, device nodes are created relative to the new
root, generally a hard disk, instead of the current root,
often an installation floppy. A root filesystem, swap area,
and recover area are created. divvy prompts for the size of
the swap area. If the disk is large enough, then divvy
prompts for a separate /u (user) filesystem. divvy also
prompts for block-by-block control over the layout of the
filesystem(s). If the root filesystem is large enough to
require a scratch filesystem, (more than 40,000 blocks) then
divvy will prompt for whether one should be created.
Usually, the root filesystem is the
The -m option is used for initial installation on devices
that will not be used as the root. It causes the user to be
prompted for a number of filesystems.
When divvy is invoked from the command line, you see a main
menu:
n[ame] Name or rename a division.
c[reate] Create a new file system on this division.
t[ype] Select or change filesystem type on new filesystems.
p[revent] Prevent a new file system from being created on this...
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
r[estore] Restore the original division table.
Please enter your choice or `q' to quit:
To choose a command, enter the first letter of the command,
then press RETURN.
The divvy division table might look something like this:
+----------+-------------+--------+---+-------------+------------+
| Name | Type | New FS | # | First Block | Last Block |
+----------+-------------+--------+---+-------------+------------+
| root | XENIX | no | 0 | 0| 47402|
| swap | NON FS | no | 1 | 47403| 50368|
| u | XENIX | no | 2 | 50369| 70368|
| | NOT USED | no | 3 | -| -|
| | NOT USED | no | 4 | -| -|
| | NOT USED | no | 5 | -| -|
| recover | NON FS | no | 6 | 70369| 70378|
| hd0a | WHOLE DISK | no | 7 | 0| 70676|
+----------+-------------+--------+---+-------------+------------+
70379 1K blocks for divisions, 298 1K blocks reserved for the system
divvy also displays information about block allocation for
system tables and bad tracks.
You can change the name of the device with the `n' command.
divvy prompts you for the division number (from the divvy
table displayed above), then for a new name.
The `c' command causes a given division to become a new,
empty filesystem when you exit from divvy. After using the
`c' command, you will see a `yes' in the `New File System?'
column. If you use command `p,' the `yes' in the `New File
System?' column will change to a `no', and the contents of
the division will not change. The `c' command must be used
when changing the size of a filesystem.
With the `s' or `start' command, you can start a division on
a different block number. With the `e' or `end' command, you
can end a division on a different block number. Note that
when you alter a division, that filesystem will be remade
(mkfs is run) and the contents destroyed. If you are
resizing your filesystems, make certain you have made
backups first.
You can use these commands to change the size of a division.
For example, if your disk is similar to the one in the
sample divvy table above, and you want to make the u
filesystem larger and the swap area smaller, do this:
Make the swap area smaller with the `e' command.
Use the `s' command to make the u division bigger.
Use the `c' command to recreate the u filesystem.
Note that if any of the divisions overlap, divvy will
complain when you try to exit and put you back in the menus
to correct the situation.
The `r' or `restore' command restores the original partition
table. This is useful if you make a serious mistake and want
to return to where you started.
When you exit from divvy, you are prompted whether you want
to save any changes you made, or exit without saving the
changes. At this time, you can also go back to the divvy
menu, and may also have the option to reinstall the
original, default partition table. If you elect to save
your changes, the new partition table will be written to the
hard disk and any new filesystems (designated with the `c'
command) will be created.
See Also
badtrk(ADM), fdisk(ADM), fsck(ADM), fsname(ADM), hd(M),
mkdev(C), mkfs(C), mknod(C)
Notes
divvy requires kernel level support from the device driver.
If divvy lists the size of a disk as ``0'' blocks, or
displays the following error messages, the device may not
support dividing:
cannot read division table
or:
cannot get drive parameters
These errors may also occur if the prerequisite programs
dparam, fdisk and badtrk are not run correctly.
If you change the size of filesystems (such as /u) after you
have installed a XENIX filesystem, you will have to use the
`c' command to re-create the filesystem and reinstall the
files that are kept there. This is because the free list
for that filesystem has changed. Be sure to backup the
files in any filesystem you intend to change, using
backup(ADM), tar(C), or cpio(C), before you run divvy . To
change the size of the root filesystem, the operating system
must be reinstalled.
During installation, if the filesystem on division 0
(generally root) becomes or remains large enough to require
a scratch area during fsck, and one does not already exist,
divvy prompts for whether one should be created. (The
resulting filesystem, /dev/scratch, is used by autoboot if
it runs fsck. /dev/scratch should also be entered when fsck
prompts for a scratch file name, provided that the
filesystem being checked is not larger than the root
filesystem.) If all disk divisions have been used up, divvy
will not prompt for a scratch filesystem, even if the root
filesystem is large enough to require one.
This utility uses 1K-byte blocks.
Value Added
divvy is an extension of AT&T System V provided by the Santa
Cruz Operation.
(printed 8/23/89) DIVVY(ADM)