fdisk(1M) SYSTEM ADMINISTRATION COMMANDS fdisk(1M)
NAME
fdisk - create (recover) a complete disk archive
SYNOPSIS
fdisk -B [-dovAENV] bkjobid odname opartdev odlab descript
fdisk -RC [-dovAENV] odname opartdev descript rsjobid
DESCRIPTION
The fdisk command is invoked as a child process by other
shell commands. The command name, fdisk, is read either
from the bkhist.tab or the bkreg -m command and option. The
-B, -R, and -C options are passed to fdisk by the shell com-
mands backup and restore. The other options are passed from
the bkhist.tab file or the bkreg -p command and option. The
arguments are sent to fdisk from various locations in the
backup service.
fdisk -B is invoked as a child process by backup to record
the formatting information required to recreate the entire
disk as it existed at the time of the archiving operation.
The formatting information consists of the disk's volume
name (not to be confused with the volume name associated
with each filesystem partition on the disk), the partitions
sizes and locations, and volume names. The resulting backup
is a data file, including the results of a prtvtoc command
that provides the information required to recreate the disk.
The backup is recorded in the backup history log,
/etc/bkup/bkhist.tab.
fdisk -RC is invoked as a child process by rsoper to recon-
struct a disk using the formatting information previously
archived, and to issue the appropriate restore requests to
repopulate the most recent data on the disk. The archive is
assumed to have been created by fdisk -B. It contains data
describing the format of the disk and the names of the
filesystems and data partitions that were present on it at
the time of the archiving operation. The arguments to fdp
are defined as follows:
bkjobid
the job id assigned by backup. The method uses the
bkjobid when it creates history log entries.
odname the name of the data partition that is to be backed
up. Unused by fdisk, but supplied by backup for
command-line compatibility with other archiving
methods.
opartdev
the name of the raw (character) device (partition of
the disk) that represents the entire disk
1
fdisk(1M) SYSTEM ADMINISTRATION COMMANDS fdisk(1M)
odlab the volume name on the filesystem [see labelit(1M)].
Unused by fdisk, but supplied by backup for command-
line compatibility with other archiving methods.
descript
is a description for a destination device in the
form:
dgroup:dname:dchar:dlabels
dgroup specifies a device group [see
devgroup.tab(4)].
dname specifies a particular device name [see
device.tab(4)].
dchars specifies characteristics associated with the
device. If specified, dchar overrides the defaults
for the specified device and group. (See
device.tab(4) for a further description of device
characteristics).
dlabels specifies the volume names for the media to
be used for reading or writing the archive.
rsjobid
the job id assigned by restore.
Options
Some options are only significant during fdisk -B invoca-
tions; they are accepted but ignored during fdisk -R invo-
cations because the command is invoked and options are
specified automatically by restore. These options are
flagged with an asterisk (*).
d* Inhibits recording the archive in the backup his-
tory log.
o Permits the user to override media insertion
requests [see getvol(1M) and the description of
the -o option].
v* Validates the archive as it is written. A check-
sum is computed as the archive is being written;
as each medium is completed, it is re-read and the
checksum recomputed to verify that each block is
readable and correct. If either check fails, the
medium is considered unreadable. If -A has been
specified, the archiving operation fails; other-
wise, the operator is prompted to replace the
failed medium.
A Establishes automated mode, (i.e., does not prompt
the user to insert or remove media).
E* Reports an estimate of media usage for the
archive; then performs the backup.
2
fdisk(1M) SYSTEM ADMINISTRATION COMMANDS fdisk(1M)
N* Reports an estimate of media usage for the
archive; does not perform the backup.
V* Generates the name and type of each partition on
the disk as its formatting information is read-to
or written-from the destination device.
User Interactions
The connection between an archiving method and backup is
more complex than a simple fork/exec or pipe. backup is
responsible for all interactions with the user, either
directly, or through bkoper. Therefore, fdisk neither reads
from standard-input nor writes to standard-output or
standard-error. A method library must be used [see lib-
brmeth(3)] to communicate reports (estimates, filenames,
periods, status, etc.) to backup.
DIAGNOSTICS
The exit codes for fdisk are the following:
0 = successful completion of the task
1 = one or more parameters to fdisk are invalid.
2 = an error has occurred which caused fdisk to fail to
complete all portions of its task.
FILES
/etc/bkup/bkhist.tab
lists the labels of all volumes that have
been used for backup operations
/etc/bkup/bklog
logs errors generated by the backup methods
and the backup command
/etc/bkup/rslog
logs errors generated by the restore methods
and the restore command
SEE ALSO
backup(1M), device.tab(4), fdp(1), ffile(1), fimage(1),
fmthard(1M), getvol(1M), incfile(1), labelit(1M), lib-
brmeth(3), prtvtoc(1M), restore(1M), rsoper(1M)
3