Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dkpart(8) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

psdf(4)

dksetup(8)

dktune(8)

format(8)

setinfo(8)

dkpart(8)                                                         dkpart(8)

NAME
     dkpart - maintain disk partition tables

SYNOPSIS
     dkpart -l [-b] [-n name] {devicename|textfile}

     dkpart -e [-n name] {[-w] devicename|textfile}

     dkpart {-d std|-f file} [-n name] [-w] devicename

     dkpart -g geo [-d std] [-n name] textfile

     dkpart -help

DESCRIPTION
     dkpart is used to maintain disk partition tables or to create disk
     partition tables for new disk types. To edit the partition table for
     an existing disk, dkpart is given the disk's character special
     devicename. Otherwise, dkpart may be used to create or edit a parti-
     tion table stored in a textfile for a disk drive type.

     Disk partitions are stored in a sixteen-element array of starting
     cylinder number and length. dkpart introduces a rule-based disk parti-
     tioning scheme which ensures changes to a given partition are
     reflected in other partitions. Thus, any change to any partition is
     properly reflected in the other partitions. This eliminates inadver-
     tent overlaying of partitions. dkpart displays a map of the partitions
     on disk to further disclose any potential errors caused by overlaying
     partitions.

OPTIONS
     -b        Displays block size.

     -d std    Sets default partitions for devicename or write default
               partitions for geo to textfile. The default partitions are
               defined in relation to the disk size.

     -e        Edits the partition table for a disk or a partition table
               stored in a text file.

     -f file   Sets partitions from file for devicename. file is the path-
               name of a text file. The format of this file must match the
               format created by dkpart. If file contains a "/", dkpart
               tries to open file, otherwise dkpart searches for file in
               the directory /etc/default/diskinfo/dkpart.

     -g geo    Calculates and edits partitions for given disk geometry. geo
               may be a character special device name of the "0" partition
               of a disk, a partition file or a disk geometry in the form

               ncyls-reservedcyls:nheads:nsectors:sectsize




Page 1                       Reliant UNIX 5.44                Printed 11/98

dkpart(8)                                                         dkpart(8)

               where ncyls is the total number of cylinders, reservedcyls
               is the number of cylinders to be reserved for alternate
               tracks and configuration information, nheads is the number
               of heads (tracks) per cylinder, nsectors is the number of
               sectors per head (track), and sectsize is the size in bytes
               of a sector.

     -l        Lists the partition table for a disk or a partition table
               stored in a text file.

               In the case of disks, only the kernel data is output. The
               data is read from the disk with the first open or is set
               using dkpart options. In a "multi-hosted" environment,
               please note the clarifications for the -X option of the
               dksetup command [see dksetup(8)].

     -n name   Sets the name of the partition table to name.

     -w        Does not attempt to write the partition table onto the
               media. This is the default for read-only media such as CD-
               ROM.

     devicename
               Character special device name of the "0" partition of a
               disk.

     textfile The pathname of a text file.

     dkpart is used to interactively edit the rules that define where a
     partition starts and ends. As rules are changed, dkpart shows the
     effect on partition sizes, layout and overlap. Once the user is satis-
     fied with the changes to the partitions, the disk partition tables are
     updated.

     Each partition has two rules: the first defines the starting cylinder,
     the second defines the ending cylinder. These rules may be:

     #       An absolute cylinder number (beginning with 0).

     #mb     A size in Mbytes. All Mbyte calculation in dkpart are in terms
             of 2^20 or 1,048,576 bytes. All Mbyte calculations are rounded
             up, if necessary, to the next cylinder.

     >pX     An expression meaning the first cylinder after partition X.

     <pX     An expression meaning the beginning of partition X.

     =pX     An expression meaning the size of partition X.

     =pX/N   An expression meaning 1/N'th the size of partition X.

     =pX*N   An expression meaning N times the size of partition X.


Page 2                       Reliant UNIX 5.44                Printed 11/98

dkpart(8)                                                         dkpart(8)

     $       An expressing meaning the remainder of the disk.

     $/N     An expressing meaning 1/N'th the remainder of the disk.

     $/N*N   An expressing meaning the remainder of the disk rounded down
             to an integral multiple of N cylinders.

     A partition size of 0 indicates the partition is not used.

     The following example illustrates the standard rules for dividing an
     MP81 into partitions:

    "MP81"     Geometry 2694-2:9:85 (cyls:heads:sectors)
Sector size = 512 bytes  1006.3 Total Mbytes (1MB = 1024 * 1024 bytes)
Partition  Start Rule   End Rule     First Cyl   Last Cyl  Cyl Count  Size (MB)
     0          >p10         70mb            6        193        188       70.2
     1          >p0          128mb         194        536        343      128.1
     2          >p1          200mb         537       1072        536      200.2
     3          >p2          170mb        1073       1528        456      170.3
     4          >p3          100mb        1529       1796        268      100.1
     5          >p4          <p15         1797       2690        894      333.9
     6          0            >p3             0       1528       1529      571.1
     7          0            >p5             0       2690       2691     1005.2
     8          >p6          >p7          1529       2690       1162      434.0
     9          0            0                   * * *    Unused    * * *
    10          0            2mb             0          5          6        2.2
    11          0            =p6/2           0        763        764      285.4
    12          >p11         >p6           764       1528        765      285.8
    13          >p12         =p8/2        1529       2109        581      217.0
    14          >p13         >p7          2110       2690        581      217.0
    15          2691         1            2691       2691          1        0.4
# Partition layout (not to scale):
|10-|-0-|---1----|------2------|-----3-----|--4---|-----------5-----------|15|
|--------------------6---------------------|--------------8---------------|
|------------------------------------7------------------------------------|
|----------11-----------|-------12---------|------13-------|-----14-------|

     The first lines contain the name of the partition table (MP81), the
     disk geometry and the size of the disk in Mbytes. The next line con-
     tains the headings of the partition division rules and partition
     sizes. For each partition, a rule is specified for the beginning of
     the partition, end of the partition, start cylinder, end cylinder, as
     well as its size in cylinders and Mbytes. The partition overview is
     followed by a disk allocation diagram which illustrates how the parti-
     tions are arranged and any overlapping partitions. The disk allocation
     diagram shows the size of the partitions in relative terms and not to
     scale.







Page 3                       Reliant UNIX 5.44                Printed 11/98

dkpart(8)                                                         dkpart(8)

     In the above example for disk MP81, partition 10 starts at cylinder 0
     and has a length of approx. 2 Mbytes (rounded off to a complete
     cylinder). This partition is provided for boot2. The start of parti-
     tion 0 can be specified at cylinder 6 or >p10 (i.e. following parti-
     tion 10). Thus, partitions 0, 1, 2, 3 and 4 follow partitions 10, 0,
     1, 2 and 3 (>p10, >p0, >p1, >p2, >p3) and have a length of 188, 343,
     536, 456 and 268 cylinders or approx. 70, 128, 200, 170 and 100
     Mbytes. Partition 5 starts after partition 4 (>p4) and ends before
     partition 15 (<p15). Partition 15 has a length of one cylinder and is
     intended to be a statesave device for mirroring disks. Partitions 0,
     1, 2, 3, 4 and 5 are provided for /, /swap, /opt, /usr, /var and
     /home.

     Partition 6 starts at cylinder 0 and ends with partition 3 (>p3). Par-
     tition 7 starts at cylinder 0 and ends with partition 5, therefore
     covering the entire disk without partition 15. Partition 8 starts at
     the end of partition 6 (>p6) and ends with partition 7 (>p7). Parti-
     tion 9 is not used. Partitions 11 and 12 each halve partition 6, and
     partitions 13 and 14 halve partition 8.

     When editing the partitions of a disk, only the start and end rules
     need to be changed. As the start or end rule is changed, the offsets
     and lengths of all other partitions and the partition layout map are
     recalculated.

     The editor uses the following commands:

     h, j, k, l  Move left, down, up or right one rule. The terminal arrow
                 keys (if any) may be substituted.

     n           Change the name of this partition table.

     TAB         Move right one field.

     s           Save changes.

     w           Write partition to text file.

     q           Quit.

     u           Undo changes to field.

     U           Undo all changes.

     D           Calculate default standard partition.

     ?           Display help about dkpart commands.

     r           Display help about partition rules.





Page 4                       Reliant UNIX 5.44                Printed 11/98

dkpart(8)                                                         dkpart(8)

EXAMPLES
     Display the partitions of disk /dev/ios0/rsdisk000:

          dkpart -l /dev/ios0/rsdisk000s0

     Edit the partition table of disk /dev/ios0/rsdisk001:

          dkpart -e /dev/ios0/rsdisk001s0

     Edit the the partition table of file 2363:

          dkpart -e 2363

     To create a partition table for a new disk type, use NEWDISK which has
     2611 cylinders, 11 reserved cylinders, 19 tracks per cylinder, 18 sec-
     tors per track, and 2048 byte sectors like this:

          dkpart -g 2611-11:19:18:2048 -n NEWDISK textfile

NOTES
     It is not possible for dkpart to detect the existence of useful infor-
     mation contained on a disk, nor will it back up or recover any exist-
     ing data. It is the user's responsibility to back up data, remake file
     systems and/or reload databases.

     dkpart is normally called by the disk formatter to write disk parti-
     tioning data into the PSDF (Pyramid Standard Disk Format). dkpart gen-
     erates default partitioning based on the disk geometry.

     If the partition table on a disk has been modified with dkpart, the
     following commands have to be invoked to enter the disk with its new
     partitions in the /etc/device.tab administration table:

          /usr/sadm/mkdbin/devtabupd -r devicename

          /usr/sadm/mkdbin/devtabupd -a devicename

     where devicename is the name of the device as it appears in the
     autoconf(8) command (e. g. ios0/sdisk014).

     It is recommended to use sysadm(1M) or Config to modify the partition
     table.

FILES
     /etc/default/diskinfo/dkpart/*

SEE ALSO
     psdf(4), dksetup(8), dktune(8), format(8), setinfo(8).






Page 5                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026