BSD 4_4 development
[unix-history] / usr / share / man / cat8 / vax / format.0
FORMAT(8) BSD System Manager's Manual FORMAT(8)
N\bNA\bAM\bME\bE
format - how to format disk packs
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
There are two ways to format disk packs. The simplest is
to use the _\bf_\bo_\br_\bm_\ba_\bt program. The alternative is to use the
DEC standard formatting software which operates under the
DEC diagnostic supervisor. This manual page describes the
operation of _\bf_\bo_\br_\bm_\ba_\bt, then concludes with some remarks
about using the DEC formatter.
_\bF_\bo_\br_\bm_\ba_\bt is a standalone program used to format and check
disks prior to constructing file systems. In addition to
the formatting operation, _\bf_\bo_\br_\bm_\ba_\bt records any bad sectors
encountered according to DEC standard 144. Formatting is
performed one track at a time by writing the appropriate
headers and a test pattern and then checking the sector by
reading and verifying the pattern, using the controller's
ECC for error detection. A sector is marked bad if an
unrecoverable media error is detected, or if a correctable
ECC error too many bits in length is detected (such errors
are indicated as ``ECC'' in the summary printed upon com-
pleting the format operation). After the entire disk has
been formatted and checked, the total number of errors are
reported, any bad sectors and skip sectors are marked, and
a bad sector forwarding table is written to the disk in
the first five even numbered sectors of the last track.
It is also possible to reformat sections of the disk in
units of tracks. _\bF_\bo_\br_\bm_\ba_\bt may be used on any UNIBUS or
MASSBUS drive supported by the _\bu_\bp and _\bh_\bp device drivers
which uses 4-byte headers (everything except RP's).
The test pattern used during the media check may be
selected from one of: 0xf00f (RH750 worst case), 0xec6d
(media worst case), and 0xa5a5 (alternating 1's and 0's).
Normally the media worst case pattern is used.
_\bF_\bo_\br_\bm_\ba_\bt also has an option to perform an extended "severe
burn-in," which makes a number of passes using different
patterns. The number of passes can be selected at run
time, up to a maximum of 48, with provision for additional
passes or termination after the preselected number of
passes. This test runs for many hours, depending on the
disk and processor.
Each time _\bf_\bo_\br_\bm_\ba_\bt is run to format an entire disk, a com-
pletely new bad sector table is generated based on errors
encountered while formatting. The device driver, however,
will always attempt to read any existing bad sector table
when the device is first opened. Thus, if a disk pack has
never previously been formatted, or has been formatted
4th Berkeley Distribution June 5, 1993 1
FORMAT(8) BSD System Manager's Manual FORMAT(8)
with different sectoring, five error messages will be
printed when the driver attempts to read the bad sector
table; these diagnostics should be ignored.
Formatting a 400 megabyte disk on a MASSBUS disk con-
troller usually takes about 20 minutes. Formatting on a
UNIBUS disk controller takes significantly longer. For
every hundredth cylinder formatted _\bf_\bo_\br_\bm_\ba_\bt prints a message
indicating the current cylinder being formatted. (This
message is just to reassure people that nothing is is
amiss.)
_\bF_\bo_\br_\bm_\ba_\bt uses the standard notation of the standalone I/O
library in identifying a drive to be formatted. A drive
is specified as _\bz_\bz(_\bx,_\by), where _\bz_\bz refers to the controller
type (either _\bh_\bp or _\bu_\bp), _\bx is the unit number of the drive;
8 times the UNIBUS or MASSBUS adaptor number plus the
MASSBUS drive number or UNIBUS drive unit number; and _\by is
the file system partition on drive _\bx (this should always
be 0). For example, ``hp(1,0)'' indicates that drive 1 on
MASSBUS adaptor 0 should be formatted; while ``up(10,0)''
indicates that UNIBUS drive 2 on UNIBUS adaptor 1 should
be formatted.
Before each formatting attempt, _\bf_\bo_\br_\bm_\ba_\bt prompts the user in
case debugging should be enabled in the appropriate device
driver. A carriage return disables debugging information.
_\bF_\bo_\br_\bm_\ba_\bt should be used prior to building file systems (with
_\bn_\be_\bw_\bf_\bs(8)) to insure that all sectors with uncorrectable
media errors are remapped. If a drive develops uncor-
rectable defects after formatting, either _\bb_\ba_\bd_\b1_\b4_\b4(8) or
_\bb_\ba_\bd_\bs_\be_\bc_\bt(8) should be able to avoid the bad sectors.
E\bEX\bXA\bAM\bMP\bPL\bLE\bE
A sample run of _\bf_\bo_\br_\bm_\ba_\bt is shown below. In this example
(using a VAX-11/780), _\bf_\bo_\br_\bm_\ba_\bt is loaded from the console
floppy; on an 11/750 _\bf_\bo_\br_\bm_\ba_\bt will be loaded from the root
file system with _\bb_\bo_\bo_\bt(8) following a "B/3" command. Bold-
face means user input. As usual, ``#'' and ``@'' may be
used to edit input.
>>>L\bL F\bFO\bOR\bRM\bMA\bAT\bT
LOAD DONE, 00004400 BYTES LOADED
>>>S\bS 2\b2
Disk format/check utility
Enable debugging (0=none, 1=bse, 2=ecc, 3=bse+ecc)? 0\b0
Device to format? h\bhp\bp(\b(8\b8,\b,0\b0)\b)
(_\be_\br_\br_\bo_\br _\bm_\be_\bs_\bs_\ba_\bg_\be_\bs _\bm_\ba_\by _\bo_\bc_\bc_\bu_\br _\ba_\bs _\bo_\bl_\bd _\bb_\ba_\bd _\bs_\be_\bc_\bt_\bo_\br _\bt_\ba_\bb_\bl_\be _\bi_\bs _\br_\be_\ba_\bd)
Formatting drive hp0 on adaptor 1: verify (yes/no)? y\bye\bes\bs
4th Berkeley Distribution June 5, 1993 2
FORMAT(8) BSD System Manager's Manual FORMAT(8)
Device data: #cylinders=842, #tracks=20, #sectors=48
Starting cylinder (0):
Starting track (0):
Ending cylinder (841):
Ending track (19):
Available test patterns are:
1 - (f00f) RH750 worst case
2 - (ec6d) media worst case
3 - (a5a5) alternating 1's and 0's
4 - (ffff) Severe burnin (up to 48 passes)
Pattern (one of the above, other to restart)? 2\b2
Maximum number of bit errors to allow for soft ECC (3):
Start formatting...make sure the drive is online
...
(_\bs_\bo_\bf_\bt _\be_\bc_\bc_\b'_\bs _\ba_\bn_\bd _\bo_\bt_\bh_\be_\br _\be_\br_\br_\bo_\br_\bs _\ba_\br_\be _\br_\be_\bp_\bo_\br_\bt_\be_\bd _\ba_\bs _\bt_\bh_\be_\by _\bo_\bc_\bc_\bu_\br)
...
(_\bi_\bf _\b4 _\bw_\br_\bi_\bt_\be _\bc_\bh_\be_\bc_\bk _\be_\br_\br_\bo_\br_\bs _\bw_\be_\br_\be _\bf_\bo_\bu_\bn_\bd_\b, _\bt_\bh_\be _\bp_\br_\bo_\bg_\br_\ba_\bm _\bt_\be_\br_\bm_\bi_\bn_\ba_\bt_\be_\bs _\bl_\bi_\bk_\be _\bt_\bh_\bi_\bs_\b._\b._\b.)
...
Errors:
Bad sector: 0
Write check: 4
Hard ECC: 0
Other hard: 0
Marked bad: 0
Skipped: 0
Total of 4 hard errors revectored.
Writing bad sector table at block 808272
(_\b8_\b0_\b8_\b2_\b7_\b2 _\bi_\bs _\bt_\bh_\be _\bb_\bl_\bo_\bc_\bk _\b# _\bo_\bf _\bt_\bh_\be _\bf_\bi_\br_\bs_\bt _\bb_\bl_\bo_\bc_\bk _\bi_\bn _\bt_\bh_\be _\bb_\ba_\bd _\bs_\be_\bc_\bt_\bo_\br _\bt_\ba_\bb_\bl_\be)
Done
(_\b._\b._\b._\bp_\br_\bo_\bg_\br_\ba_\bm _\br_\be_\bs_\bt_\ba_\br_\bt_\bs _\bt_\bo _\ba_\bl_\bl_\bo_\bw _\bf_\bo_\br_\bm_\ba_\bt_\bt_\bi_\bn_\bg _\bo_\bt_\bh_\be_\br _\bd_\bi_\bs_\bk_\bs)
(_\b._\b._\b._\bt_\bo _\ba_\bb_\bo_\br_\bt _\bh_\ba_\bl_\bt _\bm_\ba_\bc_\bh_\bi_\bn_\be _\bw_\bi_\bt_\bh _\b^_\bP)
D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
The diagnostics are intended to be self explanatory.
U\bUS\bSI\bIN\bNG\bG D\bDE\bEC\bC S\bSO\bOF\bFT\bTW\bWA\bAR\bRE\bE T\bTO\bO F\bFO\bOR\bRM\bMA\bAT\bT
W\bWa\bar\brn\bni\bin\bng\bg:\b: T\bTh\bhe\bes\bse\be i\bin\bns\bst\btr\bru\buc\bct\bti\bio\bon\bns\bs a\bar\bre\be f\bfo\bor\br p\bpe\beo\bop\bpl\ble\be w\bwi\bit\bth\bh 1\b11\b1/\b/7\b78\b80\b0
C\bCP\bPU\bU'\b's\bs.\b. The steps needed for 11/750 or 11/730 cpu's are
similar, but not covered in detail here.
The formatting procedures are different for each type of
disk. Listed here are the formatting procedures for
RK07's, RP0X, and RM0X disks.
You should shut down UNIX and halt the machine to do any
disk formatting. Make certain you put in the pack you
want formatted. It is also a good idea to spin down or
write protect the disks you don't want to format, just in
case.
4th Berkeley Distribution June 5, 1993 3
FORMAT(8) BSD System Manager's Manual FORMAT(8)
F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg a\ban\bn R\bRK\bK0\b07\b7.\b. Load the console floppy labeled,
"RX11 VAX DSK LD DEV #1" in the console disk drive, and
type the following commands:
>>>BOOT
DIAGNOSTIC SUPERVISOR. ZZ-ESSAA-X5.0-119 23-JAN-1980 12:44:40.03
DS>ATTACH DW780 SBI DW0 3 5
DS>ATTACH RK611 DMA
DS>ATTACH RK07 DW0 DMA0
DS>SELECT DMA0
DS>LOAD EVRAC
DS>START/SEC:PACKINIT
F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg a\ban\bn R\bRP\bP0\b0X\bX.\b. Follow the above procedures except
that the ATTACH and SELECT lines should read:
DS>ATTACH RH780 SBI RH0 8 5
DS>ATTACH RP0X RH0 DBA0(RP0X is, e.g. RP06)
DS>SELECT DBA0
This is for drive 0 on mba0; use 9 instead of 8 for mba1,
etc.
F\bFo\bor\brm\bma\bat\btt\bti\bin\bng\bg a\ban\bn R\bRM\bM0\b0X\bX.\b. Follow the above procedures except
that the ATTACH and SELECT lines should read:
DS>ATTACH RH780 SBI RH0 8 5
DS>ATTACH RM0X RH0 DRA0
DS>SELECT DRA0
Don't forget to put your UNIX console floppy back in the
floppy disk drive.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
bad144(8), badsect(8), newfs(8)
B\bBU\bUG\bGS\bS
An equivalent facility should be available which operates
under a running UNIX system.
It should be possible to reformat or verify part or all of
a disk, then update the existing bad sector table.
4th Berkeley Distribution June 5, 1993 4