DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

divvy(ADM)


divvy -- divide up a disk

Syntax

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

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.

divvy reports disk sizes in 1024-byte logical blocks.

The default device is /dev/rhd0a. To access non-default partitions or divisions, specify a device file on the command line (see sd01(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.

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

-m
Make a number of mountable filesystems on a disk.

-N
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.


-R
Print the size of the reserved area in kilobytes. This option is not dependent on the existence of a division table.

-S
Print the size of the whole partition in kilobytes. This option is not dependent on the existence of a division table.

Command line usage

divvy can be used on any character or block disk device file that refers to a UNIX system 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 -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|
| rhd0a             | 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:


n[ame]
Name or rename a division.

c[reate]
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.

d[elete]
Delete the filesystem on this division.

t[ype]
Select or change filesystem type on new filesystems.

p[revent]
Prevent a new filesystem from being created on this division.

s[tart]
Start a division on a different block number.

e[nd]
End a division on a different block number.

u[ndo]
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.

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

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.

Examples

The command divvy or divvy /dev/rhd0a 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.

Limitations

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. 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 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 program fdisk is 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.

See also

fdisk(ADM), fsck(ADM), fsname(ADM), sd01(HW), mkdev(ADM), mkfs(ADM), mknod(C),

Standards conformance

divvy is not part of any currently supported standard; it is an extension of AT&T System V provided by The SCO Group, Inc.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005