divvy -- divide up a disk


/etc/divvy [ -V ] [ device ]
/etc/divvy -C number begin end [ device ]
/etc/divvy -D number [ device ]
/etc/divvy -i [ -n ]  [ device ]
/etc/divvy -l [ device ]
/etc/divvy -m [ device ]
/etc/divvy -P [ number ] [ -N ] [ device ]
/etc/divvy -R [ -V ] [ device ]
/etc/divvy -S [ -V ] [ device ]


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.

divvy reports disk sizes in 1024-byte logical blocks.

The default device is /dev/hd0a. To access non-default partitions or divisions, specify a device file on the command line (see hd(HW) for a description of partition and division device naming conventions).

With divvy you can:

Options to divvy are:

-C number begin end
Create division number starting at block number begin and ending at block number end.

-D number
Delete division number.

Installation. All device nodes created on the target partition are relative to that partition, not the current root. Run only at install time from a non-active partition or root floppy.

Display filesystem labels (if any). Adds a new ``l'' interactive option that labels all unmounted filesystems with their division names.

Make a number of mountable filesystems on a disk.

During non-interactive installation, divide the disk automatically into the following divisions with default sizes:

boot filesystem

swap area

root filesystem

u filesystem

scratch area if root greater than 780MB

recover area used by fsck

This option is only used with the -i option.

Extend the output from the -P option to include node name and filename status (cannot be used without -P).

-P [ number ]
Print the start and end block numbers for division number number, or all divisions if number is not given.

This option can be used with -N to extend the output to display the device node names and filesystem status for each division.

Print the size of the reserved area in kilobytes (or in 512-byte blocks if the -V option is also specified). This option is not dependent on the existence of a division table.

Print the size of the whole partition in kilobytes (or in 512-byte blocks if the -V option is also specified). This option is not dependent on the existence of a division table.

Modify interactive behavior to enable the display of vdisk(HW) virtual disk pieces in a partition.

This option also modifies the behavior of the -R and -S options.

Command line usage

divvy can be used on any character or block disk device file that refers to a UNIX system or XENIX® partition. divvy can also be used on filesystem divisions by specifying the corresponding device file on the command line. If no device is specified, divvy defaults to the active UNIX system partition on the root hard disk.

The -i option is only used during installation. It specifies that 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 unless the -n option is specified.

divvy prompts for a separate /u (user) filesystem if the root filesystem is larger than 146MB and there is more than 78MB of disk space remaining. 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 (greater than 780MB), divvy will ask you whether one should be created. The resulting /dev/scratch filesystem is used by autoboot if it runs fsck. /dev/scratch should also be entered when fsck prompts for a scratch filename, 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.

The -m option is used for making mountable filesystems on a disk that will not include the root filesystem. It prompts for the number of filesystems.

Interactive usage

When you invoke divvy from the command line without specifying any options, you interact with it using menus.

divvy displays a division table similar to this:

| Name              | Type       | New FS | # | First Block | Last Block |
| boot              | EAFS       |  no    | 0 |            0|       14999|
| swap              | NON FS     |  no    | 1 |        15000|      110999|
| root              | HTFS       |  no    | 2 |       111000|      560999|
| u                 | HTFS       |  no    | 3 |       561000|     1056757|
|                   | NOT USED   |  no    | 4 |            -|           -|
|                   | NOT USED   |  no    | 5 |            -|           -|
| recover           | NON FS     |  no    | 6 |      1056758|     1056767|
| hd0a              | WHOLE DISK |  no    | 7 |            0|     1057775|
1056768 1K blocks for divisions, 1008 1K blocks reserved for the system
divvy may also display information about block allocation for system tables and bad tracks.

The main menu includes the following commands; these can be entered using their first letter only:

Name or rename a division.

Create a new filesystem on this division. This will be done when you exit divvy unless you change the New FS column entry to no using the command p.

Delete the filesystem on this division.

Select or change filesystem type on new filesystems.

Prevent a new filesystem from being created on this division.

Start a division on a different block number.

End a division on a different block number.

Undo the last change. This command is displayed after the division table has been changed. It reverses the effect of the most recent change to the table.

Restore the original division table. This is useful if you make a serious mistake and want start over again.

Toggle the display vdisk(HW) virtual disk pieces within a partition.

Ensure you have made backups if you resize or recreate a filesystem. Note that when you alter a division, its filesystem is remade using mkfs if its New FS entry reads yes. Any existing contents are destroyed.

You can exit divvy and save any changes; divvy writes the new partition table to disk and calls mkfs to create any new filesystems. You can also exit without making any changes.


The command divvy or divvy /dev/hd0a runs divvy interactively on the active partition on the root disk.

The command divvy /dev/hd12 or divvy /dev/rhd12 runs divvy interactively on the second partition of the second disk.

Given a partition with root, swap, and user (/u) divisions, make the /u filesystem larger at the expense of the swap area:

  1. Invoke the interactive form of divvy.

  2. Reduce the size of the swap area; use the end command to specify a lower end block number for division 1.

  3. Increase the size of /u; use the start command to specify a lower start block for division 2.

  4. Recreate /u using create.
Note that if any divisions overlap, divvy reports an error when you try to exit. It returns you to the main menu to correct the entries.


If the boot division (or root if there is no boot partition) extends beyond the first 1024 cylinders of the hard disk, divvy warns that the division may not be bootable and allows you to correct its size. During non-interactive installation, divvy tries to adjust the division table automatically; it still warns you before allowing manual interaction. divvy does not force division 0 to be located within the first 1024 cylinders if you require an unusual location.

divvy does not allow you to create a filesystem that is greater than 1 terabyte in size for DTFS(TM) and HTFS, and 2GB for other filesystems.

Division names cannot contain a ``/'' character. Names are also not allowed that would clash with other device nodes. For example, a division named oot would not be allowed because its raw device name would clash with /dev/root.

A disk may not be capable of being divided if divvy lists its size as 0 blocks, or if it displays one of the following error messages:

   cannot read division table

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 filesystem, you must use the c command to re-create the filesystem and restore its files. This is because the free list for that filesystem has changed. Be sure to back up the files in any filesystem you intend to change, using backup(ADM), tar(C), or cpio(C), before you run divvy.

You must reinstall the operating system if you want to change the size of the root filesystem.

divvy will allow you to create vdisk(HW) virtual disk pieces which are congruent with existing divisions. It will not allow you to create a division table in which division boundaries overlap virtual disk pieces.

You cannot use divvy to modify virtual disk pieces; use dkconfig(ADM) or the Virtual Disk Manager to do this.

See also

badtrk(ADM), dkconfig(ADM), dktab(F), fdisk(ADM), fsck(ADM), fsname(ADM), hd(HW), mkdev(ADM), mkfs(ADM), mknod(C), vdisk(HW)

Standards conformance

divvy is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003