mediainit.1 (2010 09)

m
mediainit(1) mediainit(1)
megabytes of data, and the remainder of the tape is used for partition 0 (for a
1300 megabytes DDS cartridge, this means that partition 0 has a size some-
what less than 900 megabytes).
Note that it is unnecessary to format a DDS tape before use unless the tape is
being partitioned. Unformatted DDS media does not require initialization
when used as a single partition tape. Accessing partition 1 on a single-
partition tape produces an error. To change a two-partition tape to single-
partition, use
mediainit with 0 specified as the size .
pathname pathname is the path name to the character (raw) device special file associated
with the device unit or volume that is to be initialized.
mediainit aborts if
you lack either read or write permission to the device special file, or if the dev-
ice is currently open for any other process. This prevents accidental initializa-
tion of the root device or any mounted volume.
mediainit locks the unit or
volume being initialized so that no other processes can access it.
Except for SCSI devices, pathname must be a device special file whose minor
number of the device being initialized has the diagnostic bit set. For device
special files with the diagnostic bit set, the section number is meaningless.
The entire device is accessed.
-c scrub_character The scrub_character refers to the character input by the user. The disk will
be scrubbed using this character. Any character between
0-9 or a-z or A
-Z
can be specified. The -c option must be used with the -S
option.
-t scrub_count If the -t option is specified, the disk will be scrubbed for scrub_count number
of times. This option must be used with the
-S option.
-S This option is used for disk scrubbing. The -c and -t options must be used
with the -S option. If both -c and -t options are not specified, then the dev-
ice will be scrubbed three times.
special_file The special_file is path name of the character (raw) device special file associ-
ated with the device that is to be scrubbed.
mediainit aborts if you do not
have either read or write permission to the device special file, or if the device
is currently open for any other process. mediainit locks the device special
file being scrubbed so that no other processes can access it.
Note that before a device special file is scrubbed, if any file system is on the
disk, you must unmount the file system.
-V This option is used to verify the scrubbed disk. The -V option randomly vali-
dates the scrubbed data written during the last pass of the disk scrub process.
The -V option must be used with the -S option.
When a given unit contains multiple volumes as defined by the drive controller, any available unit or
volume associated with that controller can be initialized, independent of other units and volumes that
share the same controller. Thus, you can initialize one unit or volume to any format or interleave factor
without affecting formats or data on companion units or volumes. However, be aware that the entire unit
or volume (as defined by the drive controller) is initialized without considering the possibility that it may
be subdivided into smaller structures by the the operating software. When such structures exist, unex-
pected loss of data is possible.
mediainit dominates controller resources and limits access by competing processes to other units or
volumes sharing the same controller. If other simultaneous processes need access to the same controller,
some access degradation can be expected until initialization is complete; especially if you are initializing a
tape cartridge in a drive that shares the root disk controller.
In general,
mediainit attempts to carefully check any -f (format option) or -i (interleave options)
supplied, and aborts if an option is out of range or inappropriate for the media being initialized. Specify-
ing an interleave factor or format option value of 0 has the same effect as not specifying the option at all.
For disks that support interleave factors, the acceptable range is usually
1 (no interleave) through n1,
where n is the number of sectors per track. Refer to the appropriate device operating manual for recom-
mended values.
If a disk being initialized requires an interleave factor but none is specified,
mediainit provides an
appropriate, though not necessarily optimum default.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010