DIVVY(ADM) XENIX System V DIVVY(ADM)
Name
divvy - Disk dividing utility
Syntax
divvy-b block_device -c character_device [-v virtual_drive]
[-p physical_drive] [-i ] [-m ]
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 file system, swap area, or for isolating bad
spots on the device.
With divvy you can:
- Divide an fdisk partition into separate devices.
- Create new file systems.
- Change the device names of file systems.
- Change the size of file systems.
- Remove file systems.
Options
Options to divvy are:
-b block_device
Major device number of block interface.
-c character_device
Major device number of character interface.
-v fdisk_partition
For dividing an fdisk partition (also known as a
``virtual drive'').
-p physical_drive
For dividing one of several physical disks that share the
same controller.
-i Disk being divided will contain a root filesystem on
division 0.
-m Disk being divided should be made into a number of
mountable file systems.
Usage
The device being divided must be a block device with a
character interface. For example, to use divvy on a device
Page 1 (printed 2/7/91)
DIVVY(ADM) XENIX System V DIVVY(ADM)
with a block-interface major number 1 and character
interface number of 1, enter:
divvy-b 1 -c 1
The -v option specifies which fdisk partition (virtual
drive) to divide. The default is the active drive. 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 specifies the device being divided will
contain a root file system. 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 and a 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 division,
(more than 40,000 blocks) then divvy will prompt for whether
one should be created. divvy is invoked with the -i option
during XENIX installation.
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 file systems.
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.
p[revent] Prevent a new file system from being created on this division.
s[tart] Start a division on a different block.
e[nd] End a division on a different block.
r[estore] Restore the original partition table.
Please enter your choice or `q' to quit:
To choose a command, enter the first letter of the command,
then press RETURN.
Page 2 (printed 2/7/91)
DIVVY(ADM) XENIX System V DIVVY(ADM)
The divvy division table might look something like this:
____________________________________________________________
| Name | New File System?| #| First Block| Last Block|
|_________|__________________|___|_____________|____________|
| root | no, exists | 0| 0 | 13754 |
| swap | no, exists | 1| 13755 | 15135 |
| u | no, exists | 2| 15136 | 25135 |
| | no | 3| -| -|
| | no | 4| -| -|
| | no | 5| -| -|
| recover | no, exists | 6| 25136 | 25145 |
| d1057all| no | 7| 0 | 25546 |
|_________|__________________|___|_____________|____________|
25146 blocks for divisions, 400 blocks reserved for
the system
divvy also displays information about block allocation for
system tables and bad tracks.
If you select option `n', you can change the name of the
device. divvy prompts you for the division number (from the
divvy table displayed above), then for a new name.
Option `c' causes a given division to become a new, empty
file system when you exit from divvy. After using the `c'
option, you will see a `yes' in the `New File System?'
column. If you use option `p,' the `yes' in the `New File
System?' column will change to a `no', and the contents of
the division will not change.
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.
You can use these two 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
root file system larger and the swap area smaller, do this:
1. Make the swap area smaller with the `s' command.
2. Use the `e' command to make the root division bigger.
Changing the size of an existing filesystem destroys any
existing data on that 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
Page 3 (printed 2/7/91)
DIVVY(ADM) XENIX System V DIVVY(ADM)
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 division table.
See Also
badtrk(ADM), fdisk(ADM), fsck(ADM), hd(HW), 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
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 run mkfs
on 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(C), tar(C), or cpio(C),
before you run divvy . After XENIX is installed, the bounds
of the root file system must not be changed.
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 BSIZE blocks. Refer to the machine (HW)
manual page for the size of filesystem blocks.
Page 4 (printed 2/7/91)