admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
NAME
admpdisk - manage physical disks
SYNOPSIS
admpdisk -o list [ -qvarL ] [ name ... ]
admpdisk -o copy -s source -d destination
admpdisk -o listmappedblocks [ -q ] name ...
admpdisk -o mapblock { -B blocknolist } ... name
admpdisk -o unmapblock { -B blocknolist } ... name
admpdisk -o verify [ -fq ] [ -B blocknolist ] ... name ...
admpdisk -o configure name ...
admpdisk -o deconfigure name ...
admpdisk -o initialize [ -a [ -q ] [ -m mapsize ] ] [ -b
bootstrapfile ] [ -l labelfile ] name ...
admpdisk -o register [ -f ] [ name ... ]
admpdisk -o deregister name ...
DESCRIPTION
The admpdisk command displays information about, and manages,
physical disks. Examples of physical disks include traditional
single-spindle magnetic disks, CD-ROMs, and Highly-Available Disk-
Arrays (H.A.D.A units).
Physical disks are rarely used directly, although each physical disk
does have an entry in /dev/pdsk and /dev/rpdsk through which it can
be accessed. However, access through these special files does not
benefit from bad block mapping (see below). Normally, the space on a
physical disk is apportioned to one or more logical disks (see
admldisk(1M)), and these logical disks are accessed directly, or
mounted as file systems. Logical disks do get the bad block mapping
described below.
Normally, each physical disk contains several system areas that
contain information necessary for maintaining the layout of logical
disks and bad block maps, booting the system, and so on. The sizes
of these areas are fixed, although their layout may vary to
accommodate defects in the physical disk. In addition, each disk
normally has a 'bad block map area', whose blocks are used as
substitutes for areas on the disk that have media defects. The size
of this area is specified when the disk is initialized.
Under certain circumstances a physical disk can be shared between
Aviion systems. This can happen if two Aviion systems are connected
to a single bus (e.g. SCSI bus), or if the physical disk subsystem
Licensed material--property of copyright holder(s) 1
admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
has multiple ports for host connections. When such a disk is opened
(or registered) by one system, it is said to be "owned" by that
system. Once so owned, the physical disk can be configured by
another system, but that's all: the other system can't initialize,
read, write, or perform an un-forced register operation on it. If
the first system closes all its descriptors to the physical disk, the
system ceases to own the physical disk, and the physical disk becomes
available for access by another system. In addition, a system can
gain access to a physical disk that is owned by another system by
using admpdisk -o register -f (the force option), effectively
stealing the physical disk from the other system. Normally this
would only be done if the other system had crashed without
relinquishing ownership of the physical disk.
In certain high-performance configurations, a single Aviion system
may have multiple I/O adapters, connected to multiple communication
buses, which are connected to multiple ports on a single physical
disk subsystem with multiple spindles. Thus an Aviion system can
"share" a "physical disk" (that is a portion of the physical disk
subsystem) with itself.
Physical disks can be categorized as follows:
State Description
------------------------------------------------------------------
Not Does not appear on listings of physical disks.
configured. Does not have an entry in /dev/pdsk. Cannot be
initialized, registered, read or written. All
that can be done to such a disk is to configure
it.
Configured, Appears in listings of physical disks, has an
but not owned. entry in /dev/pdsk. Cannot be initialized,
registered, read or written. Cannot determine
if it is initialized or not.
Configured, Appears in listings of physical disks, has an
but not entry in /dev/pdsk. Can be read and written
initialized. directly, and initialized. Usable only by
special-purpose applications that manage their
own disk resources. Has no system areas, no
bad-block mapping. Cannot be registered.
Configured and Has system areas, but they cannot be used
initialized, (logical disks cannot be used or manipulated).
but not Can be re-initialized, and read and written
registered. directly. Can be the object of a verify
operation. Can be registered.
Configured, Normal operating condition. Logical disks can
initialized, be manipulated and used. Cannot be the object
and of a verify operation. Can be read, but cannot
registered. be written to directly (only logical disks can
be written to).
Normally, physical disks are configured when the kernel is booted, so
there is no need to configure them dynamically. In addition, when
the kernel is booted, these physical disks are automatically
registered if possible.
Licensed material--property of copyright holder(s) 2
admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
Operations
The -o option is used to specify which operation to perform.
list Displays information about one or more disks. If no
disks are specified, all disks, including those that
are not registered, are listed. By default, for each
registered disk, the list output includes:
the name of the physical disk,
the state of the disk ('registered', 'not
registered', 'not available', etc.)
its size in blocks, and
the number of free blocks on the disk.
If the -a (areas) option is specified, then in
addition to the one line described above, a listing of
all the system areas on the disk is produced. This
list of system areas includes:
the name of the logical disk that the system area
is a piece of and the piece number within the
logical disk, or
a description of the system area if it is not
part of a logical disk; and
the block address of the system area, and
the size (in blocks) of the system area.
For disks that are not registered, the output consists
of the disk's name, an indication that the disk is not
registered, and the disk's size. In the future, it
may be possible to list the system areas of an
unregistered disk.
copy Copies the contents of physical disk source to
physical disk destination. Bad block mapping is
performed on both the source and destination disks.
System areas (logical disk pieces) corresponding to
those on source are created on destination, but in
general they will not be at the same physical disk
addresses. Both the source and destination physical
disks must be registered.
listmappedblocks
The block numbers of those blocks that have been the
object of a mapblock operation (or an equivalent
mapping operation performed by the kernel) are listed.
mapblock The block(s) specified with the -B option are marked
as being unusable, and alternative blocks on the
physical disk are substituted for them. Nothing is
done to recover data from the defective block(s).
Blocks that are part of a system area, or are in the
bad block remap area (as shown by the output of
admpdisk -o list -a), cannot be mapped.
unmapblock The block(s) specified with the -B option are marked
Licensed material--property of copyright holder(s) 3
admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
as being usable, and the substitute block(s) that had
been allocated to them are released. No copying of
data is performed.
verify Performs surface analysis on the disk. This is
generally not required for AViiON disk drives. By
default, three passes are made over the specified
area(s) of the disk, using three different bit
patterns. If no block number(s) are specified, all
the free blocks on the disk(s) are verified.
The disk cannot be registered when this operation is
invoked, but if no block numbers are specified, the
disk will be momentarily registered in order to
determine which areas are free, and thus should be
verified. The disk is then immediately deregistered,
and verification started.
configure The specified physical disk(s) are configured in the
kernel. Normally, disks are configured statically
when the kernel is built; such disks do not need to be
dynamically configured. In order for a disk to be
configured, the kernel must already contain the
driver(s) appropriate for that disk. Generally this
means that one can dynamically configure a device only
if there is already another device of the same type
configured.
deconfigure The specified physical disk(s) are deconfigured. To
be deconfigured, a disk must not be registered.
initialize The initialization ("soft formatting") operations
specified by the -a, -m, -b, and -l, options are
performed. If none of these options are specified,
nothing is done.
register Registers the specified disks(s). If no disks are
specified on the command line, all unregistered disks
that can be registered are registered. During system
boot, physical disks are normally automatically
registered. If two disks contain logical disk pieces
that conflict, you cannot predict which will be used.
Physical disks that are shared (connected to more than
one Aviion system) can normally be registered on only
one of the systems.
deregister Deregisters the specified disks(s). At least one disk
name must be specified on the command line. A
physical disk cannot be deregistered if it contains a
piece of a logical disk that is in use (open or
mounted).
Licensed material--property of copyright holder(s) 4
admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
Options
The following options can be used with the list, listmappedblocks,
verify and initialize -a operations:
-q Quiet. With the list and listmappedblocks
operations, no headers are printed, and fields are
separated by colons, not white space. With the verify
and initialize -a operations, the user is not asked to
confirm before the operation is performed.
The following options can be used with the list operation:
-v Verbose. This is the default output style.
-a Areas. The system areas are listed, as described
above.
-r Registered. Only registered disks are listed.
-L Labels. Each disk's label is displayed along with any
other information.
The following options must be used with the copy operation:
-s source Source physical disk.
-d destination Destination physical disk.
The following option must be used with the mapblock, unmapblock
operations, and may be used with the verify operation:
-B blocknolist
Block numbers. Multiple block numbers may be
specified by using multiple -B options, or by using
one -B option with a comma-separated list of block
numbers. Ranges of block numbers can be expressed
using dashes, as in -B 2500-2510.
The following option can be used with the verify operation:
-f Fast. Only one pass is performed, using one bit
pattern.
The following options can be used with the initialize operation:
-a System areas. The System Area Table is erased and re-
written with default values. This effectively
destroys any existing system areas, and consequently
any existing logical disks and mirrors that reside on
the physical disk(s) (but the actual data blocks of
the logical disks may not be erased). If -b is not
specified, the disk will be left without a bootstrap
program.
Licensed material--property of copyright holder(s) 5
admpdisk(1M) DG/UX 5.4.2 admpdisk(1M)
-m mapsize Mapsize specifies the number of blocks to set aside
for software mapping of bad blocks. If the -a option
is specified, but the -m option is not, no bad block
remapping will be performed on this physical disk. If
a size of 0 is specified, an appropriate default size
will be chosen.
-b bootstrapfile
Replaces the bootstrap program on the disk with the
contents of the specified file.
-l labelfile The disk label is rewritten based on the contents of
the labelfile. The format of label files is
documented in diskman(1M).
The following option can be used with the register operation:
-f Force. Used with physical disks that are owned by
another Aviion system; -f wrests ownership of the
physical disk away from the other system. This is
normally used only when the other Aviion system has
crashed.
DIAGNOSTICS
Exit Codes
0 The operation was successful.
1 The operation was unsuccessful.
2 The operation failed due to access restrictions.
3 There was an error in the command line.
NOTES
Due to a restriction in the current implementation of some system
software, the initialize operation is restricted in the following
ways:
- The -l option (install label) may not be used without the -a
(create system areas) option.
- If the -a option is used without the -b (install bootstrap)
option, a bootstrap program (the one in
/usr/stand/boot.aviion) is installed anyway, and a warning is
printed.
SEE ALSO
admldisk(1M), admmdisk(1M), gridman(1M),
Licensed material--property of copyright holder(s) 6