BSD 4_3_Reno development
[unix-history] / usr / share / man / cat8 / badsect.0
CommitLineData
5eaf1089
C
1
2
3
4BADSECT(8) 1990 BADSECT(8)
5
6
7
8N\bNA\bAM\bME\bE
9 badsect - create files to contain bad sectors
10
11S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
12 /\b/e\bet\btc\bc/\b/b\bba\bad\bds\bse\bec\bct\bt bbdir sector ...
13
14D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
15 _\bB_\ba_\bd_\bs_\be_\bc_\bt makes a file to contain a bad sector. Normally, bad
16 sectors are made inaccessible by the standard formatter,
17 which provides a forwarding table for bad sectors to the
18 driver; see _\bb_\ba_\bd_\b1_\b4_\b4(8) for details. If a driver supports the
19 bad blocking standard it is much preferable to use that
20 method to isolate bad blocks, since the bad block forwarding
21 makes the pack appear perfect, and such packs can then be
22 copied with _\bd_\bd(1). The technique used by this program is
23 also less general than bad block forwarding, as _\bb_\ba_\bd_\bs_\be_\bc_\bt
24 can't make amends for bad blocks in the i-list of file sys-
25 tems or in swap areas.
26
27 On some disks, adding a sector which is suddenly bad to the
28 bad sector table currently requires the running of the stan-
29 dard DEC formatter. Thus to deal with a newly bad block or
30 on disks where the drivers do not support the bad-blocking
31 standard _\bb_\ba_\bd_\bs_\be_\bc_\bt may be used to good effect.
32
33 _\bB_\ba_\bd_\bs_\be_\bc_\bt is used on a quiet file system in the following way:
34 First mount the file system, and change to its root direc-
35 tory. Make a directory BAD there. Run _\bb_\ba_\bd_\bs_\be_\bc_\bt giving as
36 argument the BAD directory followed by all the bad sectors
37 you wish to add. (The sector numbers must be relative to
38 the beginning of the file system, but this is not hard as
39 the system reports relative sector numbers in its console
40 error messages.) Then change back to the root directory,
41 unmount the file system and run _\bf_\bs_\bc_\bk(8) on the file system.
42 The bad sectors should show up in two files or in the bad
43 sector files and the free list. Have _\bf_\bs_\bc_\bk remove files con-
44 taining the offending bad sectors, but d\bdo\bo n\bno\bot\bt have it remove
45 the BAD/_\bn_\bn_\bn_\bn_\bn files. This will leave the bad sectors in
46 only the BAD files.
47
48 _\bB_\ba_\bd_\bs_\be_\bc_\bt works by giving the specified sector numbers in a
49 _\bm_\bk_\bn_\bo_\bd(2) system call, creating an illegal file whose first
50 block address is the block containing bad sector and whose
51 name is the bad sector number. When it is discovered by
52 _\bf_\bs_\bc_\bk it will ask ``HOLD BAD BLOCK''? A positive response
53 will cause _\bf_\bs_\bc_\bk to convert the inode to a regular file con-
54 taining the bad block.
55
56S\bSE\bEE\bE A\bAL\bLS\bSO\bO
57 bad144(8), fsck(8), format(8V)
58
59
60
61
62
63Printed 7/27/90 June 1
64
65
66
67
68
69
70BADSECT(8) 1990 BADSECT(8)
71
72
73
74D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS
75 _\bB_\ba_\bd_\bs_\be_\bc_\bt refuses to attach a block that resides in a critical
76 area or is out of range of the file system. A warning is
77 issued if the block is already in use.
78
79B\bBU\bUG\bGS\bS
80 If more than one sector which comprise a file system frag-
81 ment are bad, you should specify only one of them to _\bb_\ba_\bd_\b-
82 _\bs_\be_\bc_\bt, as the blocks in the bad sector files actually cover
83 all the sectors in a file system fragment.
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129Printed 7/27/90 June 2
130
131
132